I have a single table that combines data of all 4 versions of same Project (Project A).
I need advise on how to add a dynamic column in Matrix Visual so that when two different versions of the Project A is selected from Slicer dropdown visual, the column dates should change according to the selection made in Slicer. For instance if "Project A - Baseline" is selected in one Slicer and "Project A - Update 01" is selected in the next slicer, the dates in matrix visual should change accordingly and DAX formula to calculate the days difference from dynamic dates column as shown in the attachment.
Simple way:
Left Project Start Date =
VAR ProjectName=MIN('Sheet1'[proj_short_name])
RETURN
CALCULATE(
SELECTEDVALUE(Sheet1[Plan_Actual_Start_Date],"more then 1 start date")
,'Sheet1'[proj_short_name]=ProjectName
)
Right Project End Date =
VAR ProjectName=MAX('Sheet1'[proj_short_name])
RETURN
CALCULATE(
SELECTEDVALUE(Sheet1[Plan_Actual_Finish_Date],"more then 1 end date")
,'Sheet1'[proj_short_name]=ProjectName
)
Matrix header= "Projects Compare " & MIN('Sheet1'[proj_short_name]) & " vs " & MAX('Sheet1'[proj_short_name])