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.
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