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.
Hi everyone
I would like to have a slicer that contains Yes and No options which filter my table depending on whether a specific fields contain data or not (in this case the field is Street1).
So, if Street1 contains e.g. 20 High Street then the data will show in the table if the Slicer option of Yes is ticked. Conversely, it won't appear if the Slicer option of No is selected.
I started by adding a new Conditional Column against each record, but I feel there must be a better and more efficient way of doing this using DAX. I'd really appreciate any help that you could give me.
Many thanks
Jon
Solved! Go to Solution.
For this, if you want to use a slicer for Yes or No, the simplest solution is a calculated column along the lines of:
Contains Street? = IF(ISBLANK(Table[Street1]), "No", "Yes")
you then use this column for the slicer.
You can actually achieve this using DAX and a table containing values for Yes or No, but it is rather convoluted...
Or you can simply use the filter pane instead of a slicer (and no calculated column)
Or use buttons and bookmarks
Proud to be a Super User!
Paul on Linkedin.
For this, if you want to use a slicer for Yes or No, the simplest solution is a calculated column along the lines of:
Contains Street? = IF(ISBLANK(Table[Street1]), "No", "Yes")
you then use this column for the slicer.
You can actually achieve this using DAX and a table containing values for Yes or No, but it is rather convoluted...
Or you can simply use the filter pane instead of a slicer (and no calculated column)
Or use buttons and bookmarks
Proud to be a Super User!
Paul on Linkedin.
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 |
---|---|
104 | |
95 | |
80 | |
67 | |
62 |
User | Count |
---|---|
138 | |
107 | |
104 | |
82 | |
63 |