Forum Discussion
Anonymous
7 years agoNot applicable
Tricky Switch and AND Function - combination
Hi Experts I am trying to get the following out come based on the slicer selection criteria.... 1. If the user selects Gross Margin (first slicer) and then Reported (second slicer) then return t...
- 7 years ago
SWITCH, just like IF, cannot return a table expression.
Have you tried something like this?
SWITCH(TRUE(), ProfitbabilityMeasure = "Gross Margin" && ReportingMeasure = "Reported" , CALCULATE( [GMvPY1% (Reported PY)] , TOPN(10, ALL('Product'[Category]),[GMvPY1% (Reported PY)])
)
, ...
)
Anonymous
7 years agoNot applicable
Thanks for the excellent feedback,,,
I am guess we need to add RankingContext
))
to th eend of the statement...
Anonymous
7 years agoNot applicable
got it to work....thanks