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

The Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.

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
v-shex-msft
Community Support
Community Support

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

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.
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.










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


Proud to be a Super User!









"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

 










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


Proud to be a Super User!









"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
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Feb2025 Sticker Challenge

Join our Community Sticker Challenge 2025

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

Feb2025 NL Carousel

Fabric Community Update - February 2025

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