Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now
Hello ,
I need last 3 month average dax , based on current month .
there is no selction for month .
eg: for now there is november is current month .
Thank you .
Solved! Go to Solution.
If you have a date table, you can use this measure:
_Last3M =
VAR _today = EOMONTH(TODAY(), 0)
VAR _tbl = DATESINPERIOD('Calendar'[Date], _today, -3, MONTH)
RETURN CALCULATE(AVERAGE('Table'[Sales]), _tbl)
Try something like this
Proud to be a Super User!
If you have a date table, you can use this measure:
_Last3M =
VAR _today = EOMONTH(TODAY(), 0)
VAR _tbl = DATESINPERIOD('Calendar'[Date], _today, -3, MONTH)
RETURN CALCULATE(AVERAGE('Table'[Sales]), _tbl)
| User | Count |
|---|---|
| 55 | |
| 43 | |
| 32 | |
| 16 | |
| 13 |
| User | Count |
|---|---|
| 84 | |
| 72 | |
| 37 | |
| 27 | |
| 24 |