Forum Discussion
Report Filter Switches Which Measure is Displayed
- Anonymous1 year ago
Hi aliasch ,
Thanks Sahir_Maharaj for the quick reply. I have some other thoughts to add:
(1) We need two tables. We use the table as a slicer table and table 2 as a fact table with data such as year. Note that there is no model relationship between the two tables.
(2) We can create a measure.
Measure = IF(SELECTEDVALUE('Table'[Field])="E",[Measure2],[Measure1])(3) Then the result is as follows.
Select E only:
Select other only:
All or None or Multiple Choice:
If the above one can't help you get the desired result, please provide some sample data in your tables (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It is better if you can share a simplified pbix file. Thank you.
Best Regards,
Neeko Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hello aliasch,
Can you please try this approach:
Measure1_or_Measure2 =
SWITCH(
TRUE(),
[Filter User Selection] = "A" && NOT(ISBLANK(Measure1)), Measure1,
[Filter User Selection] = "B" && NOT(ISBLANK(Measure1)), Measure1,
[Filter User Selection] = "C" && NOT(ISBLANK(Measure1)), Measure1,
[Filter User Selection] = "D" && NOT(ISBLANK(Measure1)), Measure1,
[Filter User Selection] = "E" && NOT(ISBLANK(Measure2)), Measure2,
ISBLANK([Filter User Selection]) || ISBLANK(Measure1), Measure1,
Measure2
)
Hope this helps 🙂
Unfortunately, that didn't work 😞 I had the same issue where one filter value that had Measure 1 this year but not last year show up with Measure 2. Essentially I just need [Filter User Selection] = "E" to show Measure 2 and the rest, including all filter combinations, to show Measure 1. Even with all values selected, I want to show Measure 1. It's just when [Filter User Selection] = "E" only, then I need Measure 2. Maybe there's a different route entirely?