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
Hijau
Frequent Visitor

Matrix Subtract Subtotals for the Grandtotal

Hi Community,

 

I'm trying to subtract the subtotals in my matrix so my grandtotal shows the correct value:

Matrix P&L.PNG

 

 

I.E. the grandtotal has to show 59.736,97; 101.921,30; etc. 

 

Help would be greatly appreciated! 🙂 

 

Thanks in advance and cheers,

 

Dexter

 

 

1 ACCEPTED SOLUTION
Hijau
Frequent Visitor

For anyone wondering, I figured it out by using the next formula:

 

Actueel W&V =
VAR Omzet = CALCULATE (SUM ('Financiële Data'[Bedrag]); FILTER('Financiële Categorieën';'Financiële Categorieën'[Subsubcategorie] = "Omzet"))

VAR Kosten = CALCULATE (SUM('Financiële Data'[Bedrag]); FILTER('Financiële Categorieën';'Financiële Categorieën'[Subsubcategorie] = "Kosten"))

RETURN
(Omzet - Kosten)

 

Cheers! 

View solution in original post

3 REPLIES 3
v-yuta-msft
Community Support
Community Support

Hi Hijau ,

 

I recommend you yo use a table visual instead, create a calculate column and use DAX formula like this:

 

Grandtotal =
CALCULATE (
    SUM ( table[value] ),
    FILTER (
        table,
        table[subcategorie] = "Uitgaven"
            && table[date] = EARLIER ( table[date] )
    )
)
    - CALCULATE (
        SUM ( table[value] ),
        FILTER (
            table,
            table[subcategorie] = "Omzet"
                && table[date] = EARLIER ( table[date] )
        )
    )

 

Regards,

Jimmy Tao

 

Hi Jimmy!

 

 

Thanks for your reply :). I can't make it a table though since I would lose my drill options and those are important for the P&L I'm trying to make.. 

 

Best regards,

 

Dexter 

 

 

Hijau
Frequent Visitor

For anyone wondering, I figured it out by using the next formula:

 

Actueel W&V =
VAR Omzet = CALCULATE (SUM ('Financiële Data'[Bedrag]); FILTER('Financiële Categorieën';'Financiële Categorieën'[Subsubcategorie] = "Omzet"))

VAR Kosten = CALCULATE (SUM('Financiële Data'[Bedrag]); FILTER('Financiële Categorieën';'Financiële Categorieën'[Subsubcategorie] = "Kosten"))

RETURN
(Omzet - Kosten)

 

Cheers! 

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.