Forum Discussion
6 months moving average
- 8 years ago
Hi MMCBRAYER,
Please check the file here: https://1drv.ms/u/s!ArTqPk2pu-BkgSdlT8WMv_5-jYIQ.
Because I don't know your model structure, I tried like this. If you want more help, please provide your model.
Result = SUM ( Inventory[inventory usd] ) / CALCULATE ( SUM ( 'Sell Out'[sell out usd] ), DATESINPERIOD ( 'Calendar'[Date], MAX ( 'Calendar'[Date] ), -6, MONTH ), ALL ( 'Calendar'[YearMonth] ) )Best Regards!
Dale
Hi Mike,
I think the DOI should be a measure rather than a calculated column. Could you please post a sample in TEXT mode? The dummy PBIX would be great. I can't write a formula without data and its structure.
Best Regards!
Dale
v-jiascu-msft - here is the raw data for the graph above, and the formula for DOI, i did try to create a measure but i still can't get the formula right. thanks for the help, appreciate it!
- v-jiascu-msft8 years agoMicrosoft Employee
Hi MMCBRAYER,
Please check the file here: https://1drv.ms/u/s!ArTqPk2pu-BkgSdlT8WMv_5-jYIQ.
Because I don't know your model structure, I tried like this. If you want more help, please provide your model.
Result = SUM ( Inventory[inventory usd] ) / CALCULATE ( SUM ( 'Sell Out'[sell out usd] ), DATESINPERIOD ( 'Calendar'[Date], MAX ( 'Calendar'[Date] ), -6, MONTH ), ALL ( 'Calendar'[YearMonth] ) )Best Regards!
Dale
- Ashish_Mathur8 years agoSuper User
Hi,
Share your actual Excel or .pbix file. Also, how would you like to depict the data? What do you want to drag to rows/columns?