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

The Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.

Reply
Matt22365
Resolver III
Resolver III

Matching a card with a measure in to a column in a matrix

Hi All

Hope someone can help

I have a matrix table which has product names on rows and ingredients in columns.

The purpose of this is to show which products have which ingredients

 

Above each column of the table I have a card with a measure in to sum how many products contain the ingredient (from the column its above) and the ingredient in column 1. This works great when the user doesnt use the slicers on the page. However when the Ingredient slicers are used, the columns in the table are moved around accordingly, making it so the cards no longer represent the columns in the matrix

 

Is there a way to link a measure to which columns / Ingredients are selected so the report becomes more dynamic?

 

Thanks for your help

 

Matt 

2 REPLIES 2
Shaurya
Memorable Member
Memorable Member

Hi @Matt22365,

 

It would be great to get some sample data.

 

Thanks

Hi @Shaurya 

Picture below shows the report how I have it.

Matt22365_0-1665390475701.png

 

The numbers above the table are cards with measures to determine the total number of flavours which have Ingredient 1 and one of the other ingredients

What I would like to do next is change the cards so that if the user deselected ingredients 4 and 5 in the slicer and added ingredients 6 & 7, the cards would update to reflect the new columns

 

Current measures:

Ingredients 1 & 2 =
VAR mat1 =
CALCULATETABLE ( VALUES ( 'Table1'[Flavour] ), 'Table1'[Ingredient] = "Ingredient 1" )
VAR mat2 =
CALCULATETABLE ( VALUES ( 'Table1'[Flavour] ), 'Table1'[Ingredient] = "Ingredient 2" )
RETURN
COUNTROWS ( INTERSECT ( mat1, mat2 ) )+0
 
Data is simple
ProductFlavourIngredients
Product 1Flavour 1Ingredient 1
Product 1Flavour 1Ingredient 2
Product 2Flavour 1

Ingredient 1

Product 2Flavour 1Ingredient 3

 

Thanks for your help

Matt 

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

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

Feb2025 NL Carousel

Fabric Community Update - February 2025

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