Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
MiKeZZa
Post Patron
Post Patron

Create abberanding total

Is it possible to create an abberanding total in a matrix? This for bookkeeping purpopes?

 

What I have now is (red is wrong):

 

Revenues:

    Revenue 1                  1.000

    Revenue 2                  2.000
    Total Revenues:          3.000

Costs:
    Cost 1                         1.000 

    Cost 2                           400 

    Total Costs:                1.400

TOTAL:                           4.400

 

What I want is Total to be 1.600 (3000 - 1400), but without having the Costs also as a negative value. What I was able to create is (red is wrong):

 

Revenues:

    Revenue 1                  1.000

    Revenue 2                  2.000
    Total Revenues:          3.000

Costs:
    Cost 1                         -1.000 

    Cost 2                           -400 

    Total Costs:                -1.400

TOTAL:                           1.600

 

What I want: 

Revenues:

    Revenue 1                  1.000

    Revenue 2                  2.000
    Total Revenues:          3.000

Costs:
    Cost 1                         1.000 

    Cost 2                           400 

    Total Costs:                1.400

TOTAL:                           1.600

 

But I was not able to create this....

 

Who can help me?

1 ACCEPTED SOLUTION
Vvelarde
Community Champion
Community Champion

hi @MiKeZZa

 

you can create a new measure to obtain this result:

 

ValueRV =
VAR REVENUE =
    CALCULATE ( SUM ( Table1[Value] ), Table1[Type] = "REVENUE" )
VAR COSTS =
    CALCULATE ( SUM ( Table1[Value] ), Table1[Type] = "COSTS" )
RETURN
    IF (
        HASONEVALUE ( Table1[Type] ),
        CALCULATE ( SUM ( Table1[Value] ) ),
        REVENUE - COSTS
    )

And Use it in values Section in Matrix Visual.

MESUARE.png

 

 

 




Lima - Peru

View solution in original post

2 REPLIES 2
Vvelarde
Community Champion
Community Champion

hi @MiKeZZa

 

you can create a new measure to obtain this result:

 

ValueRV =
VAR REVENUE =
    CALCULATE ( SUM ( Table1[Value] ), Table1[Type] = "REVENUE" )
VAR COSTS =
    CALCULATE ( SUM ( Table1[Value] ), Table1[Type] = "COSTS" )
RETURN
    IF (
        HASONEVALUE ( Table1[Type] ),
        CALCULATE ( SUM ( Table1[Value] ) ),
        REVENUE - COSTS
    )

And Use it in values Section in Matrix Visual.

MESUARE.png

 

 

 




Lima - Peru

This works like a charm! Thank you!

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors