Don't miss your chance to take the Fabric Data Engineer (DP-700) exam on us!
Learn moreNext up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now
Your file has been submitted successfully. We’re processing it now - please check back in a few minutes to view your report.
COVID-19 Dashboard that uses John Hopkins data todisplay metrics related to confirmed cases, fatilities and recoveries as well as an animated scatter chart to visualize the progression of infection and fatalities over time.
The Dashboard will be updated frequently during the next few days to add more visualizes and enhance existing ones. All comments are of course welcome.
eyJrIjoiZGJjZDU1ZDAtNjhkYi00OTdjLWIwZWUtMmQ1ZGQ1NWFlNjI4IiwidCI6ImI2MWEwNzAxLTQyNWUtNGRmYi05OTlmLTFmMDRhMmM5M2MxYSJ9
How you calculate the grow rate?
Logical, it's:
1) Get the running total cases count for today, divide that by 2.
2) Find the latest date where the running total of cases is less than the current date, and the running total is greater than lookup value calculated in step 1.
3) Work out the number of days difference.
Here is the code. Hopefully this helps.
Growth Rate =
VAR varLookupRate =
CALCULATE ( DIVIDE ( [Confirmed RT], 2 ) )
VAR varCurrentDate =
CALCULATE (
MAX ( 'Date'[Date] ),
FILTER ( 'Date', NOT ISBLANK ( [Confirmed RT] ) )
)
VAR varHalfDate =
CALCULATE (
MAX ( 'Date'[Date] ),
FILTER (
ALL ( 'Date' ),
'Date'[Date] < varCurrentDate
&& [Confirmed RT] <= varLookupRate
)
)
VAR varResult =
IF (
NOT ISBLANK ( [Confirmed RT] ),
DATEDIFF ( varHalfDate, varCurrentDate, DAY ),
BLANK ()
)
RETURN
varResult