Forum Discussion
Creating measures with custom date ranges
Hello, I'm trying to create a measure that's time related however I'm working with a custom date range. The time periods are weeks and months of a year (it's a maunfacturing type time range in 5-4-4 week format).
I'd like the measure to calculate a percentage uplift when a product goes on sale promotion for a certain time period.
For example inblue below, Product 2 goes on sale in June Wk 4 for 3 weeks, and an expected 10% increase in sales is expected.
| Sales Forecast | Jun Wk 1 2019 | Jun Wk 2 2019 | Jun Wk 3 2019 | Jun Wk 4 2019 | Jun Wk 5 2019 | Jul Wk 1 2019 | Jul Wk 2 2019 | Jul Wk 3 2019 | Jul Wk 4 2019 |
| Product 1 | 9 | 9 | 9 | 9 | 9 | 7 | 7 | 7 | 7 |
| Product 2 | 9 | 9 | 9 | 9 | 7 | 10 | 9 | 14 | 17 |
| Product 3 | 7 | 7 | 7 | 12 | 12 | 7 | 7 | 22 | 14 |
This is the first time I've been working with a custom date range so could do with some pointers.. Any advice would be appreciated!
2 Replies
- v-piga-msftResident Rockstar
Hi VizDatMat ,
I still have a little confused about your scenario. What is your custom date range?
If it is convenient, could you share a a dummy pbix file which can reproduce the scenario and your desired output, so that we can help further investigate on it? You can upload it to OneDrive and post the link here. Do mask sensitive data before uploading.
Best Regards,
Cherry
- VizDatMatRegular VisitorHi thanks for your reply but I’m sorted now.. I added an index column to the custom date range which worked better than expected!