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
RichOB
Helper I
Helper I

Need help with creating measure calculations from multiple matrix's

 
1 ACCEPTED SOLUTION
vs_7
Responsive Resident
Responsive Resident

hi @RichOB 

try below measures for calculating

Net_Balance =
VAR Balance_Total =
CALCULATE (
SUM ( 'Table'[Amount_1] ),
FILTER (
'Table',
'Table'[Type] = "Balance"
)
)
VAR Salaries_Balance =
CALCULATE (
SUM ( 'Table'[Amount_1] ),
FILTER (
'Table',
'Table'[Type] = "Balance" && 'Table'[Category] = "Salaries"
)
)
RETURN
Balance_Total - ABS(Salaries_Balance)

Net_Budget =
VAR Budget_Total =
    CALCULATE (
        SUM ( 'Table'[Amount_1] ),
        FILTER (
            'Table',
            'Table'[Type] = "Budget"
        )
    )
VAR Salaries_Budget =
    CALCULATE (
        SUM ( 'Table'[Amount_1] ),
        FILTER (
            'Table',
            'Table'[Type] = "Budget" && 'Table'[Category] = "Salaries"
        )
    )
RETURN
    Budget_Total - ABS(Salaries_Budget)
Net_Variance =
VAR Net_Balance_Total = [Net_Balance]
VAR Net_Budget_Total = [Net_Budget]
RETURN
    Net_Balance_Total - Net_Budget_Total

 

View solution in original post

1 REPLY 1
vs_7
Responsive Resident
Responsive Resident

hi @RichOB 

try below measures for calculating

Net_Balance =
VAR Balance_Total =
CALCULATE (
SUM ( 'Table'[Amount_1] ),
FILTER (
'Table',
'Table'[Type] = "Balance"
)
)
VAR Salaries_Balance =
CALCULATE (
SUM ( 'Table'[Amount_1] ),
FILTER (
'Table',
'Table'[Type] = "Balance" && 'Table'[Category] = "Salaries"
)
)
RETURN
Balance_Total - ABS(Salaries_Balance)

Net_Budget =
VAR Budget_Total =
    CALCULATE (
        SUM ( 'Table'[Amount_1] ),
        FILTER (
            'Table',
            'Table'[Type] = "Budget"
        )
    )
VAR Salaries_Budget =
    CALCULATE (
        SUM ( 'Table'[Amount_1] ),
        FILTER (
            'Table',
            'Table'[Type] = "Budget" && 'Table'[Category] = "Salaries"
        )
    )
RETURN
    Budget_Total - ABS(Salaries_Budget)
Net_Variance =
VAR Net_Balance_Total = [Net_Balance]
VAR Net_Budget_Total = [Net_Budget]
RETURN
    Net_Balance_Total - Net_Budget_Total

 

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.