Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

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.

Reply
BobL
Regular Visitor

Filter report based on slicer of field names

First post as a new user here. I have a table with a large number of flag fields (OPT1 -->OPTn)  that contain a string or an empty string (see photo, I've limited it to two fields for now) I've also created a table named FlagFields with a single field named [FieldName] and populated it with the names of the two fields in the report's table. 

 

What I'd like to have happen is when I select a value in the slice (ex. OPT2),I'd like the report table to only display records that have a value in the OPT2 field (9 records).  

Thanks in advance

 

FlagFilter.JPG

 

 

2 REPLIES 2
amitchandak
Super User
Super User

@BobL 

All/one measure need to like this
calculate([measure], not(isblank(Table[OPT2])))

 

Two have slicer like this you have to create multiple such measures and use measure slicer

 https://radacad.com/change-the-column-or-measure-value-in-a-power-bi-visual-by-selection-of-the-slic...
https://community.powerbi.com/t5/Desktop/Slicer-MTD-QTD-YTD-to-filter-dates-using-the-slicer/td-p/50...
.

Thanks for the reply and I looked at the links but couldn't make the jump to how to apply their examples to what I want to do.  It seems like what I'm trying to do ought to be very simple. 

 

If I select (OPT1) in the slicer, I want to filter the table to only those records that have a value in the OPT1 field

If I select (OPT2) in the slicer, I want to filter the table to only those records that have a value in the OPT2 field

... etc 

I understand that there isn't a simple OnChange event like there would be with a C# dropdown and unfortunately I don't understand how creating a measure(s) can help me solve this. 

Thanks

 

 

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.