# Something like "Percent of Column Total" for Line Graph



## ajamess (Mar 16, 2017)

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.


year20162015Category
Sales% of SalesSales% of Sales1$50025%$80040%2$150075%$120060%Total$2000100%$2000100%

<tbody>

</tbody>
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?


----------



## akice (Mar 16, 2017)

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] ) ) )


----------

