Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
This seems like a very simple operation, but I'm farily new to DAX/PowerBI so I need some help.
I'm showing this in an Excel pivot table, but I'm really using this in Power BI desktop.
I have a matrix visualization where I'm looking at which customers use specific kits. I'm trying to identify which kits are unique to customers. In my example below, Kits 1,3, and 5 are used by multiple customers and Kit 2 and Kit 4 are only used by one customer each.
If I only show the Kits and the Count of Customers, I can filter by when the Count = 1. But as soon as I add in the customers into the matrix, I can no longer filter by the count being equal to 1 because all of the counts at the customer level are 1. Do I need to create a distinct count of customers as a variable and then filter on that? I can do this in an Excel Pivot table, but do not know the syntax in PowerBI. Thanks in advance.
Solved! Go to Solution.
Hi @alfordtp,
Do I need to create a distinct count of customers as a variable and then filter on that?
Yes. You could create a measure as below.
Measure = CALCULATE ( DISTINCTCOUNT ( Table1[Customer] ), ALL ( Table1[Customer] ) )
Select the Matrix, add this measure to visual level filter and set its value to 1.
Best regards,
Yuliana Gu
Hi @alfordtp,
Do I need to create a distinct count of customers as a variable and then filter on that?
Yes. You could create a measure as below.
Measure = CALCULATE ( DISTINCTCOUNT ( Table1[Customer] ), ALL ( Table1[Customer] ) )
Select the Matrix, add this measure to visual level filter and set its value to 1.
Best regards,
Yuliana Gu
Hi @alfordtp
you just need to create a measure where you'd remove the filter coming from customers
CALCULATE( <countrows>, ALL( TableName[Customer] ) )
Did I answer your question correctly? Mark my answer as a solution!
Proud to be a Datanaut!
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
96 | |
93 | |
82 | |
70 | |
65 |
User | Count |
---|---|
118 | |
106 | |
93 | |
79 | |
72 |