Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now
I have a couple of tables linked like below
Dates
links to SOHeader (on field [trans_date])
links to SOline [on SO_no)
so line has [sales]
Dates
links to GLTransactions (on field [trans_date])
GLTransactions has [wages]
I am trying to get a measure for a graph which is
3 mths rolling average wages / 3 mth rolling average sales
which I would just graph against time (the date on the dates table)
and where should the measure exist? on the date table?
Solved! Go to Solution.
@ScottPat , With help from date table you have to create measure like
3 Month Avg = CALCULATE(AverageX(Values('Date'[MONTH Year]),calculate(Sum('Table'[Value])))
,DATESINPERIOD('Date'[Date ],MAX('Date'[Date ]),-3,MONTH))
Rolling Months Formula: https://youtu.be/GS5O4G81fww
Power BI Window function Rolling, Cumulative/Running Total, WTD, MTD, QTD, YTD, FYTD: https://youtu.be/nxc_IWl-tTc
https://medium.com/@amitchandak/power-bi-window-function-3d98a5b0e07f
Thanks,
that got me to the solution.
@ScottPat , With help from date table you have to create measure like
3 Month Avg = CALCULATE(AverageX(Values('Date'[MONTH Year]),calculate(Sum('Table'[Value])))
,DATESINPERIOD('Date'[Date ],MAX('Date'[Date ]),-3,MONTH))
Rolling Months Formula: https://youtu.be/GS5O4G81fww
Power BI Window function Rolling, Cumulative/Running Total, WTD, MTD, QTD, YTD, FYTD: https://youtu.be/nxc_IWl-tTc
https://medium.com/@amitchandak/power-bi-window-function-3d98a5b0e07f
| User | Count |
|---|---|
| 57 | |
| 44 | |
| 32 | |
| 16 | |
| 13 |
| User | Count |
|---|---|
| 84 | |
| 70 | |
| 38 | |
| 27 | |
| 24 |