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

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount 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
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 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.

Top Kudoed Authors