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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. 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
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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