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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Cumulative Totals from a Measure

Hey y'all, 

 

So I am trying to create different scenarios of potential energy savings for a group of buildings that are selected depending on building types and building sizes from years 1-10. In the dataset, I have current annual energy use for each building. Then, I have created a measure for their expected energy use for years 1-10 using different parameters of %savings (from 0.5%-2% annually) and a parameter for year. I used a compount future value equation for this measure. For example. I can select 1.5% and Year 5, and get the energy usage in that year given a reduction oin energy consumption of 1.5% annualy. Now, I want cummulative sum of savings for each year. So for example: 

Energy Usage in Year 0 = 20 kWh

Energy Usage in Year 1 = 18 kWh 

Energy Usage in Year 2 = 16.2 kWh

Energy Usage in Year 3 = 14.58 kWh

 

NOW, I want Power Bi to tell me cumulative savings by Year 2 = 5.8 kWh (2 from Year 1 and 3.8 from year 2) and by Year 3 = 11.22 kWh. 

 

Could anyone please help? Is this possible to accomplish with measures and parameters involved? Thank y'all so much 🙂 

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Anonymous , Assume you have measure Energy Usage

 

with help from a separate date/year table joined to this table

 

Calculate( sumx(Values(Date[Year]),[Energy Usage]), filter(all(Date), Date[Year] <= Max(Date[Year]) ) )

View solution in original post

2 REPLIES 2
amitchandak
Super User
Super User

@Anonymous , Assume you have measure Energy Usage

 

with help from a separate date/year table joined to this table

 

Calculate( sumx(Values(Date[Year]),[Energy Usage]), filter(all(Date), Date[Year] <= Max(Date[Year]) ) )

Anonymous
Not applicable

Thank you so much, my friend! Have a blessed one 🙂 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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