Something like "Percent of Column Total" for Line Graph

ajamess

Board Regular
Joined
Sep 13, 2016
Messages
92
So I am completely new to PowerBI, I have done a tutorial and that is about it.

I have a problem I'm trying to do like this. I have sales over time for different categories and created a matrix like this.

[TABLE="width: 500"]
<tbody>[TR]
[TD]year[/TD]
[TD]2016[/TD]
[TD][/TD]
[TD]2015[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Category
[/TD]
[TD]Sales[/TD]
[TD]% of Sales[/TD]
[TD]Sales[/TD]
[TD]% of Sales[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]$500[/TD]
[TD]25%[/TD]
[TD]$800[/TD]
[TD]40%[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]$1500[/TD]
[TD]75%[/TD]
[TD]$1200[/TD]
[TD]60%[/TD]
[/TR]
[TR]
[TD]Total[/TD]
[TD]$2000[/TD]
[TD]100%[/TD]
[TD]$2000[/TD]
[TD]100%[/TD]
[/TR]
</tbody>[/TABLE]

The sales category is just summed from my data set. And I created the % of sales category by doing Quick Calc on sales, sum, "Show Value as.." Percent of Column Total.

However I would like to graph this % over time. And I can't get a quick calc of the column, only of the total (over all sales).

Thoughts on how I could do this?
 

Excel Facts

Lock one reference in a formula
Need 1 part of a formula to always point to the same range? use $ signs: $V$2:$Z$99 will always point to V2:Z99, even after copying
I think these 2 measures are what you want:

Total Sales = SUM ( Table[Sales )

% of Sales = DIVIDE ( [Total Sales] , CALCULATE ( [Total Sales], ALL( Table[Category] ) ) )
 
Last edited:
Upvote 0

Forum statistics

Threads
1,225,724
Messages
6,186,643
Members
453,367
Latest member
bookiiemonster

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top