Forum Discussion
Max Value from Previous Week
- 6 years ago
Hi Caz_16 ,
If you want to calculate the cases between current week and last week which based on current week, you can try this measure:
Change by week = VAR _Week = WEEKNUM ( TODAY (), 2 ) VAR thisweeknumber = CALCULATE ( SUM ( 'VDH-COVID-19-PublicUseDataset-Cases'[Total Cases] ), 'VDH-COVID-19-PublicUseDataset-Cases'[Week Number] = _Week ) VAR lastweeknumber = CALCULATE ( SUM ( 'VDH-COVID-19-PublicUseDataset-Cases'[Total Cases] ), 'VDH-COVID-19-PublicUseDataset-Cases'[Week Number] = _Week - 1 ) RETURN thisweeknumber - lastweeknumberBased on your dataset, it will get the result like this:
Best Regards,
Yingjie LiIf this post helps then please consider Accept it as the solution to help the other members find it more quickly.
Caz_16 , refer my blog on week comparison if that can help
To get the best of the time intelligence function. Make sure you have a date calendar and it has been marked as the date in model view. Also, join it with the date column of your fact/s. Refer :
https://radacad.com/creating-calendar-table-in-power-bi-using-dax-functions
https://www.archerpoint.com/blog/Posts/creating-date-table-power-bi
https://www.sqlbi.com/articles/creating-a-simple-date-table-in-dax/
See if my webinar on Time Intelligence can help: https://community.powerbi.com/t5/Webinars-and-Video-Gallery/PowerBI-Time-Intelligence-Calendar-WTD-YTD-LYTD-Week-Over-Week/m-p/1051626#M184
Appreciate your Kudos.