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.
I need to calculate rolling average in a little different way:
Step1 Get the active employee counts 12 month back i.e; 6/1/2019 counts as of today
Step 2 Get active employee counts previous month i.e, 5/1/2020 counts as of today
Step 3 Add then get average of those 2 counts.
The date sample and example: Counts of Previous Month(5/1/2020) is 2 and counts of 12 Month back(6/1/2019) is 3.
the average is 2.5
DateRan | ID | Location |
5/1/2020 | 101 | ABC |
5/1/2020 | 102 | DEF |
4/1/2020 | 101 | ABC |
4/1/2020 | 102 | DEF |
6/1/2019 | 101 | AAA |
6/1//2019 | 103 | WWW |
6/1/2019 | 105 | EEE |
The date is captured every first of the month and I have data every month
Here is formula I tried
Solved! Go to Solution.
Hi @Anonymous ,
"Step1 Get the active employee counts 12 month back", did you mean the duration is 2018/6/1-2019/6/1? If so , you could try to refer to my sample for details.
Best Regards,
Zoe Zhi
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Anonymous ,
"Step1 Get the active employee counts 12 month back", did you mean the duration is 2018/6/1-2019/6/1? If so , you could try to refer to my sample for details.
Best Regards,
Zoe Zhi
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Anonymous
To get previous year count use SAMEPERIODLASTYEAR
https://docs.microsoft.com/en-us/dax/sameperiodlastyear-function-dax
For previous Month you can use PARALLELPERIOD
https://docs.microsoft.com/en-us/dax/parallelperiod-function-dax
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 |
---|---|
102 | |
53 | |
21 | |
12 | |
12 |