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.
Hi!
I have a table in which the meter readings of my energy meters are stored every hour of the day. I have made a measure which calculates the consumption per month. Now I would like to have a rolling sum to calculate the annual consumption from month to month. For example, I want to make a line graph with in January 2020 the consumption of 01-2019 - 01/2020, in February the consumption of 02-2019 - 02-2020, March 2020 the consumption of 03-2019 - 03-2020.
My measurement for the monthly gas usage is as follows:
GasVerbruikMaandMutatie = CALCULATE([GasVerbruikPeriode], DATEADD(Kalender[Date],-0,MONTH))
GasVerbruikPeriode = CALCULATE(MAX(Energie[Gas])-(MIN(Energie[Gas])),Energie[Datum])
My table look like this:
I hope there is somebody who can help me out.
Thank you very much in advance!
Solved! Go to Solution.
Instead of DATEADD, try DATESINPERIOD. This function extends the dates back (or forward) the amount you choose.
Instead of DATEADD, try DATESINPERIOD. This function extends the dates back (or forward) the amount you choose.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
43 | |
23 | |
21 | |
15 | |
15 |
User | Count |
---|---|
45 | |
31 | |
30 | |
18 | |
17 |