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

Select column 1 value and then filter table based on that data's column 2 value

My data looks like this :

 

IDNameType
1ZZZCar
2PPPBus
3AAACar
4RRRRCar
5AAAATrain

 

I have to give user the option to select IDs (I've used a slicer drop down) and based on the selection of ID

All the product of similar type need to be displayed. 

 

For example if user selects 3, output should be

 

IDNameType
1ZZZCar
3AAACar
4RRRRCar

 

Thanks!

1 ACCEPTED SOLUTION

@Anonymous

 

Please see attached file with your sample data

 

rwrew.png

View solution in original post

4 REPLIES 4
Zubair_Muhammad
Community Champion
Community Champion

Hi @Anonymous

 

Try this technique

Assuming yoir Table's Name is Table1

First create a calculated table from Modelling Tab. This will be used as slicer

 

ID For Slicer = Values(Table1[ID])

Now create a Measure

 

Measure =
VAR selectedids =
    VALUES ( 'ID For Slicer'[ID] )
VAR myType =
    CALCULATETABLE (
        VALUES ( Table1[Type] ),
        FILTER ( ALL ( Table1 ), Table1[ID] IN selectedids )
    )
RETURN
    IF ( VALUES ( Table1[Type] ) IN myType, "Yes", "N0" )

Now Use this MEASURE as VISUAL filter

@Anonymous

 

Please see attached file with your sample data

 

rwrew.png

Thanks @Zubair_Muhammad  also helped me! What to change if I want to select two IDs at the same time?

Anonymous
Not applicable

Isn't it the same as SELECTEDVALUE finction ?

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

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.