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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
SayeeHarsha
Regular Visitor

Summarize Measures from different Tables into a Single column and derived custom column from the Res

Hi All,

 

We have 4 different Measures from 4 different Tables (Sales, Revenue, Invoice, Demand).

Our requirement is to derive a final Measure along with a Custom column that segregates the final value into 3 different categories.

Eg : Final Sum = Sales + Revenue + Invoice,

then Final Table should be  Final Sum - Demand (Table).

Categories are divided based on the final Table value as provided below for your reference : 

 

Power BI_Community_Reference_Data.png

Please reach out for any further information. 

Thank you !!

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @SayeeHarsha ,

Please follow these steps:
1. The table datas and model view as follows.

vzhouwenmsft_0-1706250703471.png

vzhouwenmsft_1-1706250720995.png

vzhouwenmsft_2-1706250740912.png

vzhouwenmsft_3-1706250760732.png

vzhouwenmsft_5-1706250867138.png

2.Use the DAX expression shown to create a measure named ‘ FinalSum-Demand ’.

 

FinalSum-Demand =
CALCULATE (
    (
        SUM ( Sales[Column2] ) + SUM ( Revenue[Column2] )
            + SUM ( Invoice[Column2] )
    )
        - SUM ( Demand[Column2] )
)

 

3.Use the DAX expression shown to create a measure .

 

Measure = 
var _a=[FinalSum-Demand]
var _b=SWITCH(
                    TRUE(),
                        _a = 0 , "Final Sum Equal Demand",
                        _a< 0 , "Final Sum < Demand",
                        _a> 0 , "Final Sum > Demand")
return
_b

 

4.Final output

vzhouwenmsft_0-1706251218089.pngvzhouwenmsft_1-1706251234728.png


Best Regards,
Wenbin Zhou
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

2 REPLIES 2
Anonymous
Not applicable

Hi @SayeeHarsha ,

Please follow these steps:
1. The table datas and model view as follows.

vzhouwenmsft_0-1706250703471.png

vzhouwenmsft_1-1706250720995.png

vzhouwenmsft_2-1706250740912.png

vzhouwenmsft_3-1706250760732.png

vzhouwenmsft_5-1706250867138.png

2.Use the DAX expression shown to create a measure named ‘ FinalSum-Demand ’.

 

FinalSum-Demand =
CALCULATE (
    (
        SUM ( Sales[Column2] ) + SUM ( Revenue[Column2] )
            + SUM ( Invoice[Column2] )
    )
        - SUM ( Demand[Column2] )
)

 

3.Use the DAX expression shown to create a measure .

 

Measure = 
var _a=[FinalSum-Demand]
var _b=SWITCH(
                    TRUE(),
                        _a = 0 , "Final Sum Equal Demand",
                        _a< 0 , "Final Sum < Demand",
                        _a> 0 , "Final Sum > Demand")
return
_b

 

4.Final output

vzhouwenmsft_0-1706251218089.pngvzhouwenmsft_1-1706251234728.png


Best Regards,
Wenbin Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

 

amitchandak
Super User
Super User

@SayeeHarsha , You need to create a new measure

 

m1=

var _new= ([Sales]+ [Revenue]+ [Invoice])- [Demand]

return

Switch(True(),

_new >0 , "Final Sum > Demand",

_new <0 , "Final Sum < Demand",

"Final Sum equal Demand"

)

 

 

if you need slicer, do Dynamic Segmentation

 

Dynamic Segmentation, Bucketing or Binning: https://youtu.be/CuczXPj0N-k

Dynamic segmentation -Measure to Dimension conversion: https://youtu.be/gzY40NWJpWQ

Customer Retention with Dynamic Segmentation, New/Lost/Retain Customer Count: https://youtu.be/EyL7KMw877Q

Power BI ABC Analysis using Window function, Dynamic Segmentation: https://youtu.be/A8mQND2xSR4

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.