Reply
Syndicate_Admin
Administrator
Administrator
Syndicated - Inbound

Average three last years measured

Source Community: Power BI Spanish | Source Author Name: nibanez

good!

NOTE: I searched the forum to see if they had already created the post and yes, they have created it but in the answer the link is broken, so I can't check the measurement with the table it creates. That's why I've created a new post (https://community.fabric.microsoft.com/t5/Translated-Spanish-Desktop/Promedio-de-los-%C3%BAltimos-tr...).

I have a power bi with the monthly consumption of water consumption. In order to make the annul variations, I have made a calendar table and the following measurements:

nibanez_0-1721033760434.png

Annual consumption current year:

C. Water Current Year = sum('Monthly water'[m3])
Annual consumption of the previous year:
C. Water Previous Year = CALCULATE([C. Water Current Year],DATEADD(Calendar[Date],-1,YEAR))
Annual variation:
Were. C. Annual Water = were Variacio=DIVIDE([C. Water Current Year],[C. Water Previous Year])-1
WERE final=IF([C. Water Current Year]=0||[C. Water Previous Year]=blank(),
BLANK(),Variacio)
RETURN Variacio
Now I would need to be able to make the variation of the average of the last three years...
Could you help me?

1 ACCEPTED SOLUTION
ryan_mayu
Super User
Super User

Syndicated - Outbound

maybe you can try this

 

=divide(sum('Monthly water'[m3])+ CALCULATE([C. Water Current Year],DATEADD(Calendar[Date],-1,YEAR))+ CALCULATE([C. Water Current Year],DATEADD(Calendar[Date],-2,YEAR)),3)

 

 

if you can get last year's consumption, then it will be easy for you to get the consumption of the year before last year.





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




View solution in original post

1 REPLY 1
ryan_mayu
Super User
Super User

Syndicated - Outbound

maybe you can try this

 

=divide(sum('Monthly water'[m3])+ CALCULATE([C. Water Current Year],DATEADD(Calendar[Date],-1,YEAR))+ CALCULATE([C. Water Current Year],DATEADD(Calendar[Date],-2,YEAR)),3)

 

 

if you can get last year's consumption, then it will be easy for you to get the consumption of the year before last year.





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




avatar user

Helpful resources

Announcements
March PBI video - carousel

Power BI Monthly Update - March 2025

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

March2025 Carousel

Fabric Community Update - March 2025

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

Top Solution Authors (Last Month)
Top Kudoed Authors (Last Month)