Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
I have a slicer with two items. I need to blank out several fields in the report if the second item in the slicer list is selected. How can I check which item in the list of the slicer is selected in DAX statement?
Thanks, Mark
Solved! Go to Solution.
If your slicer is on Table1[ColumnA], then VALUES(Table1[ColumnA]) should give you a list of distinct values that you have selected with your slicer. You can test if an item is in that list using IN. For example, if it's the text string "Second Item", then you'd write
"Second Item" IN VALUES(Table1[ColumnA])
which will return True or False.
@Anonymous,
Create a measure in your table using DAX below.
Measure= if(SelectedValue(Table[slicerfield])="seconditem name",<value_if_true>, <value_if_false>)
If you still have questions, please share sampled data of your table and post expected result here.
Regards,
Lydia
@Anonymous,
Create a measure in your table using DAX below.
Measure= if(SelectedValue(Table[slicerfield])="seconditem name",<value_if_true>, <value_if_false>)
If you still have questions, please share sampled data of your table and post expected result here.
Regards,
Lydia
If your slicer is on Table1[ColumnA], then VALUES(Table1[ColumnA]) should give you a list of distinct values that you have selected with your slicer. You can test if an item is in that list using IN. For example, if it's the text string "Second Item", then you'd write
"Second Item" IN VALUES(Table1[ColumnA])
which will return True or False.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
114 | |
97 | |
85 | |
70 | |
61 |
User | Count |
---|---|
151 | |
121 | |
104 | |
87 | |
67 |