Forum Discussion
tasmiaa
Advocate I
6 years agoMeasure showing previous scenario
Account Value Scenario A 10 A1 A 5 A2 B 3 A1 A 5 A3 A 4 A1 I have a slicer that allows users to pick their Scenario (A1, A2, A3) and a measure that sums Value at the giv...
parry2k
Super User
6 years agotasmiaa sorry it is not clear what is the logic to get previous scenario. Can you provide more details?
tasmiaa
Advocate I
6 years agoSure!
Previous Scenario = IF(SelectedValue(Scenario) == "A1", "A3", IF(SelectedValue(Scenario) == "A2", "A1", If(SelectedValue(Scenario) == "A3", "A2")))
- parry2k6 years ago
Super User
tasmiaa here is the measure for previous scenario value
Previous Scenario = VAR __selectedValue = SELECTEDVALUE ( PRev[Type] ) VAR __prev = SWITCH ( __selectedValue, "A1", "A3", "A2", "A1", "A3", "A2" ) RETURN CALCULATE ( [Total Amt], PRev[Type] = __prev )change table and col name as per your mode, [Total Amt] is simple sum of amount column