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

How do I use 2 different calculations for 1 column with several values?

Hi all,

 

I have a table of data that currently has one measure totalling up the amount for each business area, however for one business area i need to adjust the measure to calculate the total but miss out one column of data.

Business AreaBillable (£)Supplier (£)Fixed cost (£)Total (£)
A100009000450023500
B20000010000052000352000
C030000020000320000

 

The requirement is to calcualte the total for Business Areas A & B but not to include the Supplier(£) Value,

 

So the expected outcome would be as follows

 

Business AreaBillable (£)Supplier (£)Fixed cost (£)Total (£)
A100009000450014500
B20000010000052000252000
C030000020000320000
1 ACCEPTED SOLUTION
v-yiruan-msft
Community Support
Community Support

Hi @James_Ma ,

You can create a measure as below to get it, please find the details in the attachment.

Total = 
VAR _business =
    SELECTEDVALUE ( 'Table'[Business Area] )
RETURN
    IF (
        _business IN { "A", "B" },
        SUM ( 'Table'[Total (£)] ) - SUM ( 'Table'[Supplier (£)] ),
        SUM ( 'Table'[Total (£)] )
    )

vyiruanmsft_0-1709190856847.png

Best Regards

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

View solution in original post

1 REPLY 1
v-yiruan-msft
Community Support
Community Support

Hi @James_Ma ,

You can create a measure as below to get it, please find the details in the attachment.

Total = 
VAR _business =
    SELECTEDVALUE ( 'Table'[Business Area] )
RETURN
    IF (
        _business IN { "A", "B" },
        SUM ( 'Table'[Total (£)] ) - SUM ( 'Table'[Supplier (£)] ),
        SUM ( 'Table'[Total (£)] )
    )

vyiruanmsft_0-1709190856847.png

Best Regards

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

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.

Top Solution Authors