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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
Bmejia
Super User
Super User

Dynamic Header with All data and by what is being filter

I am trying to figure out how to create a dynamic header that shows all the values in a particular column base on what is being filter at the page level and what the user is filtering on.

 

Example

My table has category column, with values A, B, C, D, E, F, G

 

My page filter is filter on only A, B, C and have a drop down on the visual that shows same filter A, B, C  (The Page Filter will be use from time to time to add more categories, but by default need to keep it at A, B, C)

I am trying to create a dynamic header base on everything that has being filter at the page level and by the user when they use the drop down.

 

Example,  “All Categories Being Filter at page level A, B, C, Data, Filter by C Only”

 

This measure  is only shows me what the user filter the data on, which is good for my part of my filter.
Category Header =  "Filter by User" & CONCATENATEX (VALUES ( Table[Category] ), Table[Category],", ")

But, this measure is showing everything on the table category column (A-G).  I have used all except, allSelected, keepfilters,  and other measures and can’t seem to keep it to just what is being filter at page level.
Category Header = "All Categories Being Filter at page level" & CALCULATE(CONCATENATEX(VALUES(Table[Category]), 'Table'[Category], ", ", Table[Category], ASC), All(Table[Category]))

 

Thank you in advance

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Bmejia ,

 

Both Page level filter and drop down slicer are all filters, so if you use same Category column from table in them, it is hard to achieve your goal.

I suggest you to create an unrelated Category table for slicer.

Category for User = VALUES('Table'[Category])

Create a measure to filter this slicer.

Measure Filter = 
IF(MAX('Category for User'[Category]) in VALUES('Table'[Category]),1,0)

Add measure into visual level filter and set it to show items when value = 1.

vrzhoumsft_0-1681971718279.png

New Measure:

Category Header = 
VAR _FilterbyPagelevel =
    CONCATENATEX ( VALUES ( 'Table'[Category] ), 'Table'[Category], ", " )
VAR _FilterbyUser =
    CONCATENATEX (
        VALUES ( 'Category for User'[Category] ),
        'Category for User'[Category],
        ", "
    )
RETURN
    "All Categories Being Filter at page level" & " " & _FilterbyPagelevel & " "
        & IF (
            ISFILTERED ( 'Category for User'[Category] ),
            "Data, Filter by" & " " & _FilterbyUser
        )

Result is as below.

vrzhoumsft_1-1681971780897.png

 

Best Regards,
Rico Zhou

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

View solution in original post

2 REPLIES 2
Bmejia
Super User
Super User

Thank you for you help, This works perfectly.  😀

Anonymous
Not applicable

Hi @Bmejia ,

 

Both Page level filter and drop down slicer are all filters, so if you use same Category column from table in them, it is hard to achieve your goal.

I suggest you to create an unrelated Category table for slicer.

Category for User = VALUES('Table'[Category])

Create a measure to filter this slicer.

Measure Filter = 
IF(MAX('Category for User'[Category]) in VALUES('Table'[Category]),1,0)

Add measure into visual level filter and set it to show items when value = 1.

vrzhoumsft_0-1681971718279.png

New Measure:

Category Header = 
VAR _FilterbyPagelevel =
    CONCATENATEX ( VALUES ( 'Table'[Category] ), 'Table'[Category], ", " )
VAR _FilterbyUser =
    CONCATENATEX (
        VALUES ( 'Category for User'[Category] ),
        'Category for User'[Category],
        ", "
    )
RETURN
    "All Categories Being Filter at page level" & " " & _FilterbyPagelevel & " "
        & IF (
            ISFILTERED ( 'Category for User'[Category] ),
            "Data, Filter by" & " " & _FilterbyUser
        )

Result is as below.

vrzhoumsft_1-1681971780897.png

 

Best Regards,
Rico Zhou

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

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