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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
azakir
Resolver I
Resolver I

Help with a measure

Hi Guys. 

Looking for some help with a measure. I have got two tables. One has the the data and other one has list of Emission Factors per year by location. The column Consumption gets multiplied by emissions from another table. 

 

*Asia =
            CALCULATE
            (SUM(Electricity_Combined[Consumption (kWh) [kWh]]]),
            Electricity_Combined[State2] = "Jakarta" || Electricity_Combined[State2] = "India" || Electricity_Combined[State2] = "Mongolia" ||
            Electricity_Combined[State2] = "East Kalimantan")
            *
            CALCULATE(MAX('Electricity Emissions Factors'[Factor]),
            'Electricity Emissions Factors'[Emissions] = "Indonesia" ||
            'Electricity Emissions Factors'[Emissions] = "India" ||
            'Electricity Emissions Factors'[Emissions] = "Mongolia")
 
 

azakir_0-1676876851591.png

azakir_2-1676877071309.png

 

The issue I am facing, using Indonesia as an example, if I use 2022 as an example, it still gets multiplied by 0.88. I would like the measure to multiply with the corresponding year, 0.717 in this example. I understad I am using MAX(Factor) in my measure, is there a way where it should select the factor based on the year. 

1 ACCEPTED SOLUTION
3 REPLIES 3
amitchandak
Super User
Super User

@azakir , Have a common country table and then Try measure like

 

Sumx(Values(Country[County]) , calculate( SUM(Electricity_Combined[Consumption (kWh) ]) * MAX('Electricity Emissions Factors'[Factor]) )  )

 

https://amitchandak.medium.com/power-bi-when-i-asked-you-to-create-common-tables-a-quick-dax-solutio...

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

Thanks @amitchandak . How would I go about in making sure the date is also factored in? So Electricity Combined table has date column "New Reporting". Emission Factor has date column as "Yr". They both are connected via a date table. I would like it to multiply the emission factor based on the year. 

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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