Forum Discussion
Median %
- 6 years ago
Now that I have everything as a column in my Summary table. I think this might work for me.
Median = CALCULATE(MEDIAN(TEST[% Change]), DATESINPERIOD(TEST[MMM_YYYY],PREVIOUSMONTH(ZZTEST[MMM_YYYY]), -12, MONTH)).Will this get me a rolling 12 months of Medians?
Why are you creating a measure for the sum of sales? I am trying to determine the % Change? what is "Date filer"
Rolling 12 Median before 12 = CALCULATE(MEDIANX(VALUES('Date'[Format Month]),[Sum Sales]),DATESINPERIOD('Date'[Date Filer],ENDOFMONTH(dateadd(Sales[Sales Date],-12,month)),-12,MONTH))
Change % will not have date. It should be like
(Rolling 12 Median -Rolling 12 Median before 12 )/(Rolling 12 Median before 12 )*100
((Current - Prior)/Prior)*100
- Jorgast6 years ago
Resolver II
Now that I have everything as a column in my Summary table. I think this might work for me.
Median = CALCULATE(MEDIAN(TEST[% Change]), DATESINPERIOD(TEST[MMM_YYYY],PREVIOUSMONTH(ZZTEST[MMM_YYYY]), -12, MONTH)).Will this get me a rolling 12 months of Medians?- amitchandak6 years ago
Super User
Actually you need to test that
- v-juanli-msft6 years ago
Community Support
Hi Jorgast
It should be correct, except it returns median of 2018/12-2019/11 for the row 2019/11.
You could use the column to return median of 2018/11-2019/10 for the row 2019/11,
c = CALCULATE ( MEDIAN ( [change%] ), DATESINPERIOD ( 'date'[Date], EOMONTH ( MAX ( 'date'[Date] ), -1 ), -12, MONTH ) )If you have any problem, please feel free to let me know.
Best Regards
MaggieCommunity Support Team _ Maggie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.- Jorgast6 years ago
Resolver II
When I use that measure I get 0.60% for every month. It looks like the measure is trying to get the Median value for the entire data column of % Change. I need the Median value to be a rolling 12 months of historical % Change data.