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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
sportive92003
Helper II
Helper II

% for each category

Hello,

I would like to distribute the % for each category of product. I did a selection for only the clients we are lost.

 

sportive92003_0-1725892150397.png

thanks!

1 ACCEPTED SOLUTION

@sportive92003 

 

if you omit "sum" then it will be work.

View solution in original post

4 REPLIES 4
sportive92003
Helper II
Helper II

That works! Thank you very so much ! So happy to get your help! 

Selva-Salimi
Super User
Super User

@sportive92003 

 

you should write a measure as follows:

 

measure percentage :=

var total = calculate (sum(diff) , all(table))  -- or you can use allselected based on what you expect

return

divide (diff, total)

 

If this post helps, then I would appreciate a thumbs up  and mark it as the solution to help the other members find it more quickly. 

Hello,

DIFF is a Measure to calculate the nomber of clients this year VS last year:

 

([Clients uniques Lub-Carb (présent dans un ou l'autre)]-[Clients uniques (Lub-Carb) same period]). 

 

So in your formula it doesn't work. How to fix it?

@sportive92003 

 

if you omit "sum" then it will be work.

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.