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

Preparing for a certification exam? Ask exam experts all your questions on May 15th. Register now.

Reply
LostPBIUser
New Member

Count of Customers in Hierarchy

Hi, I am simply trying to get a count of customers to show the same as the parent line. Below is what I have. What I want to have happen is every customer number below ID 6 to be equal to 16 instead of 1. The same thing would apply to all the other IDs as well. So ID 2 would have every customer number below it as 74 for example.

 

LostPBIUser_0-1701986357046.png

 

4 REPLIES 4
Anonymous
Not applicable

Hi @LostPBIUser ,

Did the above suggestions help with your scenario? if that is the case, you can consider Kudo or Accept the helpful suggestions to help others who faced similar requirements.

If these also don't help, please share more detailed information and description to help us clarify your scenario to test.

How to Get Your Question Answered Quickly 

Regards,

Xiaoxin Sheng

danextian
Super User
Super User

Hi @LostPBIUser ,

 

Try this measure:

=
CALCULATE ( [Customer Count], ALLEXCEPT ( data, data[ID] ) )

This calculates the count of customers per ID.





Dane Belarmino | Microsoft MVP | Proud to be a Super User!

Did I answer your question? Mark my post as a solution!


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.

That didn't work. It still shows '1' for each individual customer id when expanded on. I need for it to show '16' on each individual customer.

Hi @LostPBIUser ,

 

It should work unless there are peculiarities in your model that makes it not work or you're using the wrong columns. Please see sample pbix.

danextian_0-1702099878212.png

 





Dane Belarmino | Microsoft MVP | Proud to be a Super User!

Did I answer your question? Mark my post as a solution!


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.

Helpful resources

Announcements
PBIApril_Carousel

Power BI Monthly Update - April 2025

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

Notebook Gallery Carousel1

NEW! Community Notebooks Gallery

Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.

April2025 Carousel

Fabric Community Update - April 2025

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