0
votes

I have been googling for a few hours for a solution of this simple task with no luck. I have a simple table

Cat         Sales   
Apples       30     
Apples       50     
Apples      100     
Cherries     50     
Cherries     80     

How do I make Power BI calculate subtotals? Tried Quick Measures, but neither of them works. This is what I get when applying Sum of Sales total for Cat = CALCULATE(SUM('Table1'[Sales]), ALLSELECTED('Table1'[Cat])) :

Cat         Sales   Sum of Sales total for Cat
Apples       30      30
Apples       50     100
Apples      100     100
Cherries     50     100
Cherries     80      80

I am looking to get something like this:

Cat         Sales   Sum of Sales total for Cat
Apples       30      30
Apples       50      80
Apples      100     180
Cherries     50      50
Cherries     80     130
1
Subtitles are automatically enabled when you add more than one field to the Rows input.David
What do you mean by Rows input?ggv
Each visual takes different input fields, matrix for example takes Rows, Columns and Values. See this screenshot. If you add more than one field to the Rows input area of a matrix, subtotals (not subtitles, how did that happen?) should be displayed automatically.David
Ok, you use new Matrix visual. I was trying on the old one. But stll, is it possible to make that individual amounts appear in one column, running total - in the other?ggv
Is there some kind of date column? how are your sales ordered?user5226582

1 Answers

0
votes

Create a new measure: Category= Values('Table'[Cat]).

Add this measure in matrix in place of 'Cat' column.