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

Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.

Reply
Anonymous
Not applicable

DAX for unique values and sum at the end of each level of hierarchy

Hi Team,

I am looking for a solution here. I need the Ranging opp to be simply 1 for unique porduct codes. (Here it is summing it up)I have created a column with just "1" as Ranging opportunity here. Also, I want to be able to see the sum of the entire rows and at each hierarchy level. I am sure there must be a way out but I can't seem to find one. Can someone please help me

(Product code is Text type)

JuniorPowerBI_0-1688347094548.png

Thanks in advance!

1 ACCEPTED SOLUTION
rbriga
Impactful Individual
Impactful Individual

Can you explain a bit further?

It sounds like 

Ranging Opps= COUNTROWS( VALUES(QUERY1[PRODUCT_CODE]))

id the solution, but it could be I'm not understanding the issue.

 

-------------------------
Data analyst by day, hockey goalie by night.
Did I help? Then please hit that "kudos" or "accept as a solution" button!

View solution in original post

1 REPLY 1
rbriga
Impactful Individual
Impactful Individual

Can you explain a bit further?

It sounds like 

Ranging Opps= COUNTROWS( VALUES(QUERY1[PRODUCT_CODE]))

id the solution, but it could be I'm not understanding the issue.

 

-------------------------
Data analyst by day, hockey goalie by night.
Did I help? Then please hit that "kudos" or "accept as a solution" button!

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.