Forum Discussion
DDL1976
5 years agoFrequent Visitor
Help with a DAX Switch (Filter with a Related Table)
Hi there, I have a DAX function that is working, but I want to extend the logic so its Dynamic rather than hard coded.. I have a slicer that selects 1 of the 2 options in the table below 'Re...
amitchandak
Super User
5 years agoDDL1976 , Something like this
SWITCH(True()
[Select Report To] =1 && RELATED(DimPeriod[Period End Date]) <= DATE(2020,4,30) , Calculate (sum(FactActualAndPlans[Value]), Filter(FactActualAndPlans, RELATED(DimPeriod[Period End Date]) <= DATE(2020,4,30))) ,
[Select Report To] = 2, SUM(FactActualAndPlans[Value])
)