Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
Hi,
I am trying to calculate average last 12 months debtor days.
The step by step calculation is:
A. average last 3 months sales
B. debtor closing balance
C. days in count
D. debtor days for the month = ( B / (A/C))
E. debtor days last 12 months = average of D for past 12 months.
Now I have got A through D measures working but unable to get a measure working for E.
Because A through D are all measures I couldn't simply use sum(D, datesbetween). Couldn't figure out an alternative.
Thanks for helping
Regards,
Yon
Solved! Go to Solution.
@yonk , I think this type of measure should work
Rolling 12 = calculate(AverageX(Values('Date'[MONTH Year]),[Debtor Days]),DATESINPERIOD('Date'[Date ],MAX('Date'[Date ]),-12,MONTH))
You can check for number of month to only get it when 12 months are there
Hi @amitchandak ,
I might not have explained myself clearly so I have screenshot a replicate in excel.
Basically my DAX formula in PowerBI is at the top (highlighted green & working fine) but I'm scratching my head on what the DAX formula needs to be for G(yellow highlighted). In simple terms, G needs to be a rolling 12 months average of F. I don't think the suggested formula gave me that answer.
Thanks for the help
Regards,
yonk
@yonk , I think this type of measure should work
Rolling 12 = calculate(AverageX(Values('Date'[MONTH Year]),[Debtor Days]),DATESINPERIOD('Date'[Date ],MAX('Date'[Date ]),-12,MONTH))
You can check for number of month to only get it when 12 months are there
Thank you very much this seems to work!
@yonk , if you need sum till month level and then take Average then
example
Rolling 12 = calculate(AverageX(Values('Date'[MONTH Year]),CALCULATE(sum(Sales[Sales Amount]))),DATESINPERIOD('Date'[Date ],MAX('Date'[Date ]),-12,MONTH))
Rolling Months Formula: https://youtu.be/GS5O4G81fww
Average of Rolling, Average of Snapshots: https://youtu.be/_pZRdLAJxxA
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
76 | |
76 | |
55 | |
35 | |
34 |
User | Count |
---|---|
99 | |
56 | |
53 | |
44 | |
40 |