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

Get certified in Microsoft Fabric—for free! For a limited time, the Microsoft Fabric Community team will be offering free DP-600 exam vouchers. Prepare now

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
OCT PBI Update Carousel

Power BI Monthly Update - October 2024

Check out the October 2024 Power BI update to learn about new features.

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

October NL Carousel

Fabric Community Update - October 2024

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