Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
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
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
145 | |
85 | |
66 | |
52 | |
48 |
User | Count |
---|---|
215 | |
90 | |
83 | |
67 | |
59 |