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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

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
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

AugPowerBI_Carousel

Power BI Monthly Update - August 2024

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

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

Sept NL Carousel

Fabric Community Update - September 2024

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