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

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

Reply
Anonymous
Not applicable

Calculating measure across multiple tables

Hello,

 

I have the below model and am looking to set up a measure that will give me a solution the multiplies values for each of the columns highlighted in yellow. Each dimension table contains a numeric conversion from the answers to a survey that is in the 'Commute' table that i would like to give a total value per row

reidnmorrison_0-1667303548178.png

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

I have managed to generate the correct data as a 'New Column' and the following code. Any advice on a better method would be amazing

 

CO2 emissions_column = 
VAR dateval =    
    CALCULATE(
        SUM('DateValue'[Number Value - days/week]),
        CROSSFILTER(Commute[Freq], 'DateValue'[Days/Week Value], Both)
    )
VAR Postcode_dist = 
    CALCULATE(
        SUM('Postcode'[Distance (km)]),
        CROSSFILTER(Commute[Postcode], Postcode[Postcode], Both)
    )
VAR Vech_type =
    CALCULATE(
        SUM('Type'[2022]),
        CROSSFILTER(Commute[Commute Index], 'Type'[Index], Both)
    )
VAR EV_data =
        CALCULATE(
        SUM('EV'[Remove_0]),
        CROSSFILTER(Commute[Electric], 'EV'[Electric Vehicle Useage], Both)
    )

VAR result = CALCULATE(
                SUMX('Commute', dateval * Vech_type * Postcode_dist * EV_data * 'Commute'[Car_share_fraction])
)
Return
    result

 

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Hi @Anonymous ,

 

Great job!

 

Best Regards,

Jay

Anonymous
Not applicable

I have managed to generate the correct data as a 'New Column' and the following code. Any advice on a better method would be amazing

 

CO2 emissions_column = 
VAR dateval =    
    CALCULATE(
        SUM('DateValue'[Number Value - days/week]),
        CROSSFILTER(Commute[Freq], 'DateValue'[Days/Week Value], Both)
    )
VAR Postcode_dist = 
    CALCULATE(
        SUM('Postcode'[Distance (km)]),
        CROSSFILTER(Commute[Postcode], Postcode[Postcode], Both)
    )
VAR Vech_type =
    CALCULATE(
        SUM('Type'[2022]),
        CROSSFILTER(Commute[Commute Index], 'Type'[Index], Both)
    )
VAR EV_data =
        CALCULATE(
        SUM('EV'[Remove_0]),
        CROSSFILTER(Commute[Electric], 'EV'[Electric Vehicle Useage], Both)
    )

VAR result = CALCULATE(
                SUMX('Commute', dateval * Vech_type * Postcode_dist * EV_data * 'Commute'[Car_share_fraction])
)
Return
    result

 

Helpful resources

Announcements
October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 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 Kudoed Authors