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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
nrungta
Frequent Visitor

filter count with total of counts

I have three columns
Distributor Name,    Invoice No.,        Month Name

 

Now I use a matrix table where I use my Distributor Name in Rows, Month Name in columns and DistinctCount in Values

Now supposedly each row wise the total count comes to 9 in 20 rows, 8 in 22 rows, 7 in 15 rows, and .......

How do I slice this value 9 so only 20 rows show.

Also what Calculated Column or Explicit Measure can I use.
Thank you in advance

1 ACCEPTED SOLUTION

Hi,
  I cant tell you how much I love you for this. 
In the DAX Code

SUMMARIZE('Table','Table'[Distributor Code],"Slicer",COUNTROWS('Table'))

 I changed it to 

SUMMARIZE('Table','Table'[Distributor Code],"Slicer",distinctcount('Table'[Month]))

and then I got the desired answer. The invoices contain row-wise entry of individual items.

I have a further addition to this query now, 
suppose there was another column of Brands
and I wanted this whole table slicer to be based of only one brand, then what should i do?
please help me again thank you.
@v-gizhi-msft 

View solution in original post

5 REPLIES 5
amitchandak
Super User
Super User

The information you have provided is not making the problem clear to me. Can you please explain with an example. If possible please share a sample pbix file after removing sensitive information.
Thanks.

My Recent Blog -
https://community.powerbi.com/t5/Community-Blog/Winner-Topper-on-Map-How-to-Color-States-on-a-Map-wi...
https://community.powerbi.com/t5/Community-Blog/HR-Analytics-Active-Employee-Hire-and-Termination-tr...

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

I have attached a screenshot of the above problem, now it should hopefully give a clear meaning to the problem I am facing.
PS- I have changed the Distributor name to distributor code.2020-01-14 16_47_51-Window.png

Hi,

 

According to your description, i create a table to test:

91.PNG

Choose a matrix visual, and it shows:

96.PNG97.PNG

Then, i create a calculated table:

Slicer = SUMMARIZE('Table','Table'[Distributor Code],"Slicer",COUNTROWS('Table'))

And it shows:

92.PNG

Then, manage their relationship as one to many:

93.PNG

Now, choose column [Slicer] as a slicer visual, and it shows:

94.PNG

95.PNG

 

Best Regards,

Giotto Zhi

Hi,
  I cant tell you how much I love you for this. 
In the DAX Code

SUMMARIZE('Table','Table'[Distributor Code],"Slicer",COUNTROWS('Table'))

 I changed it to 

SUMMARIZE('Table','Table'[Distributor Code],"Slicer",distinctcount('Table'[Month]))

and then I got the desired answer. The invoices contain row-wise entry of individual items.

I have a further addition to this query now, 
suppose there was another column of Brands
and I wanted this whole table slicer to be based of only one brand, then what should i do?
please help me again thank you.
@v-gizhi-msft 

Hi,

 

For your requirement, please move your 'Brand' column to page filter field, and it shows:

141.PNG

 

142.PNG

 

Best Regards,

Giotto Zhi

 

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

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