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

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now

Reply
AdamGarcia_SCTA
Frequent Visitor

Difference Value in same column between years

Hello,

I'd like help and/or recommendations for adding a new indicator Card for a greenhouse gas dashboard that calculates the difference of GHG emissions between two years. All the emissions data is in a single column organized by year.

 

The simple indicator:

The Card would show the difference in total GHG emissions (‘Activity’[Metric Tons of Carbon Dioxide Equivalent]) between 1990 and 2020 and would change depending on the three filter on the bottom of the page for: Jurisdiction, Activity Type, and Activity Name.

Simple Indictor - Change 1990 to 2020.png

 

The complicated indicator:

Similar to above, only the indicator Card would show the difference in total GHG emissions between the year chosen in the Year filter at the bottom of the page and 2020, with the three other filters still in effect as above. If possible, the indicator Card title would also have to change depending on the year filter chosen at the bottom of the page.

Complicated Indictor - Change 1990 to 2020.png

 

Is there a way to do this in the existing 'Activity' table, or would a new table be needed?

 

Thank you for your help,

 

Adam

 

link: power bi ghg dashboard

1 ACCEPTED SOLUTION
lbendlin
Super User
Super User

you had that as a calculated column, but you need a measure

 

lbendlin_0-1712512996850.png

 

Dif 1990 to 2020 = SUMX(FILTER(ALL(Activity), Activity[Year]=1990), [Metric Tons of Carbon Dioxide Equivalent]) - SUMX(FILTER(ALL(Activity), Activity[Year]=2020), [Metric Tons of Carbon Dioxide Equivalent])

View solution in original post

3 REPLIES 3
lbendlin
Super User
Super User

you had that as a calculated column, but you need a measure

 

lbendlin_0-1712512996850.png

 

Dif 1990 to 2020 = SUMX(FILTER(ALL(Activity), Activity[Year]=1990), [Metric Tons of Carbon Dioxide Equivalent]) - SUMX(FILTER(ALL(Activity), Activity[Year]=2020), [Metric Tons of Carbon Dioxide Equivalent])

Thank you, though I received an error. This should be obvious but not sure what needs changing.

 

The syntax for '1990' is incorrect. (DAX(Dif 1990 to 2020 = SUMX(FILTER(ALL(Activity),Activity[Year]=1990), [Metric Tons of Carbon Dioxide Equivalent]) - SUMX(FILTER(ALL(Activity), Activity[Year]=2020), [Metric Tons of Carbon Dioxide Equivalent]))).

What is the (DAX... part supposed to do?

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.