Forum Discussion
Getting results from past dates
- 7 years ago
Hi Anonymous ,
You can create columns to get year and Period, then create measure to get average.
Year= MID(Table1[Period],7,4)
Period=INT(MID(Table1[Period],2,2))
Measure1= CALCULATE(AVERAGE(Table1[Score_Value]),FILTER(ALLSELECTED(Table1), Table1[Year]=MAX(Table1[Year])&&Table1[Period]<MAX(Table1[Period])))
Best Regards,
Amy
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi Anonymous ,
You can create columns to get year and Period, then create measure to get average.
Year= MID(Table1[Period],7,4)
Period=INT(MID(Table1[Period],2,2))
Measure1= CALCULATE(AVERAGE(Table1[Score_Value]),FILTER(ALLSELECTED(Table1), Table1[Year]=MAX(Table1[Year])&&Table1[Period]<MAX(Table1[Period])))
Best Regards,
Amy
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- Anonymous7 years agoNot applicable
Hi v-xicai
Thanks for your reply.
Before I test however, would this work?
The periods are 4 weeks long, not accounting for the 2/3 days at the end of the months.
This means that some periods span across two months.
Regards,
Cameron
- v-xicai7 years agoCommunity Support
Hi Anonymous ,
You can have a try, maybe you need to rename the Month to Period in the formula above.
If I misunderstood it, could you please share your sample data for further analysis? You can also upload sample pbix to OneDrive and post the link here. Do mask sensitive data before uploading.
Best Regards,
Amy