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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Anonymous
Not applicable

Combine the values from different columns into one slicer - then filter the table based on selection

Hello Everyone

I would like to combine  Sign1 and Sign2 in one slicer, then based on selection from the slicer I would like to find the max date.

Sample table-

Rid123_0-1633553024993.png



Result Expected-

Rid123_2-1633553285618.png

 

Thanks in advance

1 ACCEPTED SOLUTION
AlexisOlson
Super User
Super User

You'll need to create a new table for the slicer. You can do this in the query editor or in DAX like this:

SignSlicer = DATATABLE ( "Sign", STRING, { { "P" }, { "Q" } } )

 

Once you have that, you can define the Max Date measure.

Max Date =
SWITCH (
    SELECTEDVALUE ( SignSlicer[Sign] ),
    "P", CALCULATE ( MAX ( Table1[Dates] ), Table1[Sign1] = "P" ),
    "Q", CALCULATE ( MAX ( Table1[Dates] ), Table1[Sign2] = "Q" ),
    MAX ( Table1[Dates] )
)

 

View solution in original post

1 REPLY 1
AlexisOlson
Super User
Super User

You'll need to create a new table for the slicer. You can do this in the query editor or in DAX like this:

SignSlicer = DATATABLE ( "Sign", STRING, { { "P" }, { "Q" } } )

 

Once you have that, you can define the Max Date measure.

Max Date =
SWITCH (
    SELECTEDVALUE ( SignSlicer[Sign] ),
    "P", CALCULATE ( MAX ( Table1[Dates] ), Table1[Sign1] = "P" ),
    "Q", CALCULATE ( MAX ( Table1[Dates] ), Table1[Sign2] = "Q" ),
    MAX ( Table1[Dates] )
)

 

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

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

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 community update carousel

Fabric Community Update - June 2025

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