Skip to main content
Showing results for 
Search instead for 
Did you mean: 

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Not applicable

Calculate the Pertectage of the current Coronavirus

Hey guys for the current corona virus i have built a webscraper and get the following raw data.

I would like to calculate the "Death rate" in power bi by using a formula or something else.

My Idea is (only for China please)

Death rate: 100 / confirmed cases (7 days before the latest update) * Deaths from the current update.

or in Raw data

Death rate: 100 / 834,26 (01-24-2020,18:06,China) * 259 (02-01-2020,02:02,China)


I get an Update multiply times a day. So we need to focusing on Date (02-01-2020 - 7 Days = 01-24-2020)


Hope you can help me with an formular

Thanks Guys.


02-01-2020,00:36,Sri Lanka,1,0
02-01-2020,02:02,China (mainland),11821,259


Community Support
Community Support

Hi, @Anonymous 


Typically, your data model will contain a calendar table. In fact, it is usually better to aggregate data by year and month using columns of a calendar table (containing one row for each day) instead of  extracting the date parts from a single column of type date or datetime in calculated columns.


For further information, you may refer to the following links.


Best Regards



If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Super User
Super User

You can use relative date slicer :


Or you can use a rolling 7 day measure. example

Rolling 7 = CALCULATE(sum(Sales[Sales Amount]),DATESINPERIOD('Date'[Date],maxx(sales,Sales[Sales Date]),-7,DAY))   


In both case prefer a date calendar table.

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.


Appreciate your Kudos. In case, this is the solution you are looking for, mark it as the Solution. In case it does not help, please provide additional information and mark me with @
Thanks. My Recent Blog -
Winner-Topper-on-Map-How-to-Color-States-on-a-Map-with-Winners , HR-Analytics-Active-Employee-Hire-and-Termination-trend
Power-BI-Working-with-Non-Standard-Time-Periods And Comparing-Data-Across-Date-Ranges

Connect on Linkedin

Helpful resources

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.


Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.


Fabric certifications survey

Certification feedback opportunity for the community.