Reply
Visitor
Posts: 1
Registered: ‎01-17-2019
Accepted Solution

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

[ Edited ]

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!


Accepted Solutions
Super User
Posts: 2,833
Registered: ‎09-27-2017

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

@sk1994

 

Please see attached file with your sample data

 

rwrew.png

View solution in original post

Attachment

All Replies
Highlighted
Super User
Posts: 2,833
Registered: ‎09-27-2017

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

Hi @sk1994

 

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

Super User
Posts: 2,833
Registered: ‎09-27-2017

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

@sk1994

 

Please see attached file with your sample data

 

rwrew.png

Attachment