Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi
I hope someone can help
I have a dataset (which I cannot alter its format) which I am pulling into BI
What I need is a measure to allow a card visual to count multiple materials in a product
Using the example data below, I want:
I tried pivoting the data on the material column, however this disrupts my ability to use the materials column as a slicer to add or remove materials from a matrix visual on the same page
Thanks for your help
Matt
Example data:
Product | Material |
Product 1 | Material 1 |
Product 2 | Material 1 |
Product 3 | Material 2 |
Product 1 | Material 2 |
Solved! Go to Solution.
You could try
Materials 1 & 2 =
VAR mat1 =
CALCULATETABLE ( VALUES ( 'Table'[Product] ), 'Table'[Material] = "Material 1" )
VAR mat2 =
CALCULATETABLE ( VALUES ( 'Table'[Product] ), 'Table'[Material] = "Material 2" )
RETURN
COUNTROWS ( INTERSECT ( mat1, mat2 ) )
You could try
Materials 1 & 2 =
VAR mat1 =
CALCULATETABLE ( VALUES ( 'Table'[Product] ), 'Table'[Material] = "Material 1" )
VAR mat2 =
CALCULATETABLE ( VALUES ( 'Table'[Product] ), 'Table'[Material] = "Material 2" )
RETURN
COUNTROWS ( INTERSECT ( mat1, mat2 ) )
Amazing!, that works perfectly
Thanks for your help
Matt
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
65 | |
64 | |
56 | |
39 | |
27 |
User | Count |
---|---|
85 | |
59 | |
45 | |
43 | |
38 |