Forum Discussion
thliberato
Helper I
9 years agoValue selected in the filter
How do I get a value selected in the filter to use in a measure ? For Example. I create a filter with myoptions. I created a measure named Test (I know that this sintax is wrong). Test = ...
v-huizhn-msft
Microsoft Employee
9 years agoHi thliberato,
You'd better use swith function as the follewing fformula. When you select the "Current" value, it will run the [Internet Total Sales] measure, when select the "MTD", it will run [MTD Sales] and so on. If you don't select, it will return balnk.
Sales := SWITCH ( VALUES ( Period[Period] ), "Current", [Internet Total Sales], "MTD", [MTD Sales], "QTD", [QTD Sales], "YTD", [YTD Sales], BLANK () )
For more details, please refer to the article.
Best Regards,
Angelia