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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
Syndicate_Admin
Administrator
Administrator

Average three last years measured

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

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

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!




Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

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