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

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.

Reply
alfordtp
Frequent Visitor

Filter by parent row total

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.

 

image.png

1 ACCEPTED SOLUTION
v-yulgu-msft
Employee
Employee

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.

1.PNG

Best regards,

Yuliana Gu

Community Support Team _ Yuliana Gu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
v-yulgu-msft
Employee
Employee

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.

1.PNG

Best regards,

Yuliana Gu

Community Support Team _ Yuliana Gu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
LivioLanzo
Solution Sage
Solution Sage

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!  

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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