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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
Anonymous
Not applicable

Filter a column based on selected value in a slicer (from another table) - show in multirow card

Hi,

 

I have a table like the following, and I want to filter it based on the selected value of the slicer. The slicer values are from a lookup table which are related to that data table on ID. I use Info column inside the slicer, for example. There is also date dimension in data table, which I don't show it here for now.

 

IDitemvalue
C11Test-C1-1
C12Test-C1-2
C13Test-C1-3
B11Test-B1-1
B12Test-B1-2
B13 
A11Test-A1-1
A12Test-A1-2
A13Test-A1-3

 

lookup table:

 

IDInfo
A1InfoA1
B1InfoB1
C1InfoC1

 

I want to filter the data table based on the (single) selected value of the slicer and show only the "value" column in a multi-row card visual.

 

I have tried some measures like values, etc. But it doesn't work.

 

 

 

measure = 
VAR id_first_ = FIRSTNONBLANK('lookup'[ID], 0)
RETURN
CALCULATE((VALUES('Data'[Value])), FILTER('Data', 'Data'[ID] = id_first_))

 

 

 

Looking forward to your help.

 

 

 

6 REPLIES 6
Anonymous
Not applicable

Hi @Anonymous ,

 

Does the replies above solve your problem? If it has been solved, please mark the correct reply as the standard answer to help the other members find it more quickly.Thank you very much for your kind cooperation!

 

Hope it helps,


Community Support Team _ Caitlyn

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

AllisonKennedy
Super User
Super User

@Anonymous 

 

Make sure the value is set to 'Don't summarize': 

AllisonKennedy_0-1632793863393.png

 

If you've done that, it should work automatically based off the relationships - no Measure needed.

 

Otherwise you can see what I meant with the Card visual. 

 

AllisonKennedy_1-1632794012699.png

 

 

Attached file below signature.


Please @mention me in your reply if you want a response.

Copying DAX from this post? Click here for a hack to quickly replace it with your own table names

Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C

I work as a Microsoft trainer and consultant, specialising in Power BI and Power Query.
www.excelwithallison.com

Anonymous
Not applicable

Thank you very much for your reply.

And sorry for my late reply.

 

I have already tried this and yes, it works nicely. But it does not fully fit my purpose. 

 

I have multi-level hierarchy. When upper levels are selected, it shows all the items of its lower levels in the hierarchy.

What I want is: only select the values related to the package selected (at each hierarchy), whether it is up or low in the hierarchy. If blank, just show blank.

 

Exmaple of data (connected on "code" column):

 

Lookup table:

 

ID-MainIDInfocode
Main1A1InfoA1Main1A1
Main1B1InfoB1Main1B1
Main1C1InfoC1Main1C1
Main2M1InfoM1Main2M1
Main2N1InfoN1Main2N1
Main2O1InfoO1Main2O1
Main1 InfoMain1Main1
Main2 InfoMain2Main2

 

Data table:

 

IDitemvalueID-Maincode
C11Test-C1-1Main1Main1C1
C12Test-C1-2Main1Main1C1
C13Test-C1-3Main1Main1C1
B11Test-B1-1Main1Main1B1
B12Test-B1-2Main1Main1B1
B13 Main1Main1B1
A11Test-A1-1Main1Main1A1
A12Test-A1-2Main1Main1A1
A13Test-A1-3Main1Main1A1
M11Test-M1-1Main2Main2M1
M12Test-M1-2Main2Main2M1
M13Test-M1-3Main2Main2M1
N11Test-N1-1Main2Main2N1
N12 Main2Main2N1
N13Test-N1-3Main2Main2N1
 1Test-Main2-1Main2Main2
 2Test-Main2-2Main2Main2
 3Test-Main2-3Main2

Main2


Example of unwated outcome:

 

mah65_0-1635216187378.png

 

Example of desired outcome:

 

mah65_1-1635216273973.png

 

 

AllisonKennedy
Super User
Super User

@Anonymous 

I'm not sure Multi Row Card will give you what you want, it looks like your values are descriptive. 

 

You can try this MEASURE in a card visual:

 

Value List = CONCATENATEX( VALUES('Data'[Value]) , 'Data'[Value], ", " )


Please @mention me in your reply if you want a response.

Copying DAX from this post? Click here for a hack to quickly replace it with your own table names

Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C

I work as a Microsoft trainer and consultant, specialising in Power BI and Power Query.
www.excelwithallison.com

Anonymous
Not applicable

Thank you very much.

No, card is not suitable for my task.

I just want a multi-row card to show filtered rows of value column.

 

There should be a way, for example by filtering/summarizing the table, and then show that? I'm not sure.

@Anonymous  Have you tried my measure? It lists all the rows, separated by comma. 

 

There is no way to show the filtered rows in a card visual without adding a unique ID or category value. I'll mock up a sample file for you, just give me a few minutes...


Please @mention me in your reply if you want a response.

Copying DAX from this post? Click here for a hack to quickly replace it with your own table names

Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C

I work as a Microsoft trainer and consultant, specialising in Power BI and Power Query.
www.excelwithallison.com

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.

Top Solution Authors