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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Divide chart values to total

Greetings everyone,

 

I got stuck in a problem with probably a simple solution.

 

I have a chart of products with actual selling(grey bars) and goal on selling(green bars).

 

I need to divide the actual selling to the total of the actual sellings on each product and the goal selling on each product to the  total of the goal selling for each product.

 

So basically dividing the green bars ammount to the total of the green bars ammount and the gray bars ammount to the total of the gray bars ammount.

In the end I will have to make the result to look like a percentage and be next to those bars, but I think that is something I can manage.

 

Example: 10,337/15,610 ; 2362/15,610 (green barss)

1,487 / 2550 ; 421 / 2550 ( gray bars)

 

Thank you for your support!

 

 

powerbi.PNG

1 ACCEPTED SOLUTION
Anonymous
Not applicable

If ActualSelling is your measure,

 

TotalSelling = 
CALCULATE(
[ActualSelling],
ALL(Table[Product])
)

You can create another measure TotalGoalSelling by the same way

 

Then you can create the final measure as = DIVIDE(ActualSelling,TotalSelling)

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

If ActualSelling is your measure,

 

TotalSelling = 
CALCULATE(
[ActualSelling],
ALL(Table[Product])
)

You can create another measure TotalGoalSelling by the same way

 

Then you can create the final measure as = DIVIDE(ActualSelling,TotalSelling)

Anonymous
Not applicable

This is the right idea but I need to find a formula to split the total on products, like create a second measure from the one that was generated by the chart that looks exactly like the chart and after that divide them.

 

Basically the picture that I posted was generated, I need to find out a formula that does the same thing but I am the one writing it, not generating from drag and drop.

Anonymous
Not applicable

If you use the final measures as sugested and drag this measure in your bar chart with product on X Axis, it would works fine

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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