Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Im trying to learn Power BI and using COVID-19 data as my data source. So I have data of COVID-19 cases per day and per country.
I want to create a new column that sums one date and the previous day for a specific country using Power Query. I have never created anything with Power Q before so keep in mind I am a real beginner.
Basically i want the formula to do this.
I figure that i need to use IF and SUM functions for this but im having a hard time to figure out the code.
Solved! Go to Solution.
Hi @Anonymous ,
You could try to use measure like below to see whether it work or not.
Best Regards,
Zoe Zhi
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hello @Anonymous
If I understand you need correctly I think you are better off doing Rolling DAX caclulation as opposed to attempt to do this within M Code.
There are plenty of articles online regarding rolling sums in DAX, I think if you incorporate this with the What If Scenario features you will have the information you are seeking.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.