The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
Hi,
I need help with creating a DAX measure that shows roling 12 month values.
I tried creating a measure as below but it shows cumalative and is wrong..
Solved! Go to Solution.
Hi @dinhandy1
you can try
Rolling 12 CA =
VAR CurrentDate =
MAX ( 'Rolling 12'[reportdate] )
VAR StartDate = CurrentDate - 364
RETURN
CALCULATE (
[Total CA $],
REMOVEFILTERS ( 'Rolling 12' ),
'Rolling 12'[reportdate] >= StartDate,
'Rolling 12'[reportdate] <= CurrentDate
)
If you have filter safe columns (columns that you use in slicers) then you need to replace REMOVEFILTERS with ALLEXCEPT and add the filter safe columns inside it.
Hi @dinhandy1
you can try
Rolling 12 CA =
VAR CurrentDate =
MAX ( 'Rolling 12'[reportdate] )
VAR StartDate = CurrentDate - 364
RETURN
CALCULATE (
[Total CA $],
REMOVEFILTERS ( 'Rolling 12' ),
'Rolling 12'[reportdate] >= StartDate,
'Rolling 12'[reportdate] <= CurrentDate
)
If you have filter safe columns (columns that you use in slicers) then you need to replace REMOVEFILTERS with ALLEXCEPT and add the filter safe columns inside it.
User | Count |
---|---|
16 | |
8 | |
6 | |
6 | |
5 |
User | Count |
---|---|
23 | |
13 | |
13 | |
8 | |
8 |