Forum Discussion
help with getting total between two dates
Hello cwnoll
You may try the following link:
https://www.vivran.in/post/moving-average-using-dax
In this replace the average calculation with the sum.
Cheers!
Vivek
If it helps, please mark it as a solution
Kudos would be a cherry on the top 🙂
https://www.vivran.in/
Connect on LinkedIn
Vivek,
I tried out this measure and had to make one a small correction (removed Filter() part and adding "-1" to each mindate). Please see the updated measure below.
6-6 Gross Charges =
VAR mindate =
MIN ( 'Calendar'[Date] )
VAR prev12mos =
DATESINPERIOD ( 'Calendar'[Date], mindate-1, -12, MONTH )
VAR prev6mos =
DATESINPERIOD ( 'Calendar'[Date], mindate-1, -6, MONTH )
VAR prevprev6mos =
EXCEPT ( prev12mos, prev6mos )
RETURN
CALCULATE ( SUM ( 'ProjectX'[Gross Charges] ), prevprev6mos )
Also, don't worry about trying to use functions and do things you don't fully understand. Almost everyone in this community is sharing knowledge from all the mistakes they've made. Keep learning and trying new things.
If this works for you, please mark it as solution. Kudos are appreciated too. Please let me know if not.
Regards,
Pat