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

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount 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
September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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