cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Teletubbi Frequent Visitor
Frequent Visitor

Income Statement Sum by Category

Hi,

 

I have a table with an account scheme like an income statement (see left table on the picture). I can create the values for each account for each month but not for the sum of those accounts in the same category. Furthermore I cannot implement calculated measures in the left table (like Total 1+ Total 2 + Total 3 = Total 4). On the right picture I calculated the totals which I want to implement in the table on the left. Do you have any ideas?

 

Link to image: https://ibb.co/wsqmrPZ

 

pbi23

 

For the values for each account I used: Balance = sumx(Testdaten;Testdaten[Summe])

For the sum by category (account) I used: SumbyCategory = CALCULATE(SUM(Testdaten[Summe]);ALLEXCEPT(Testschema;Testschema[Category]))

 

I also tried to use switch...but that doesn't show any data in the totals. Maybe I did something wrong there:

Switch =
IF (
COUNTROWS ( VALUES ( Testschema[Level]) ) = 1;
SWITCH (
VALUES ( 'Testschema'[Account] );
"Income 1"; [Balance];
"Income 2"; [Balance];
"Income 3"; [Balance];
"Income 4"; [Balance];
"Total T+T2+T3"; [Total4];

BLANK ()
);
100
)

 

I use a Date Table, a datatable and a table for the account scheme. Data looks like this:
Link to picture: https://ibb.co/3SK1Bnq

pbi2

1 REPLY 1
Community Support Team
Community Support Team

Re: Income Statement Sum by Category

hi, @Teletubbi 

You could just drag "Category" field above "Account" field in matrix visual, and then use subtotal function of matrix.

3.JPG

 

Best Regards,

Lin

  

 

Community Support Team _ Lin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Meet the 2020 Season 1 Power BI Super Users!

Meet the 2020 Season 1 Power BI Super Users!

It’s the start of a new Super User season! Learn all about the new Super Users and brand-new tiered recognition system.

Super User Challenge: Can You Solve These?

Super User Challenge: Can You Solve These?

We're celebrating the start of the New Super User season with our first ever Super User 'Can You Solve These?' challenge.

Power BI Desktop Update - February 2020

Power BI Desktop Update - February 2020

We are super excited for our update this month, as we are releasing two of our top community requests!

Power Platform Online Conference

Power Platform Online Conference

Join us for the first ever Power Platform Online Conference!

Top Solution Authors