Forum Discussion
DOUBLING TIME FOR COVID-19 CASES
For me, it is not clear of your expected solution regarding to that "Double confirm" or "Double death". Basically I am confused with the ThresholdValue and Day of Half variables. Can you explain that measure?
Days to Double =
VAR CurrentDay = MAX(COVID[Date])
VAR ThresholdValue =
CALCULATE(SUM(COVID[Value]), COVID[Date] = CurrentDay) / 2
VAR DayOfHalf =
CALCULATE(
MAX( COVID[Date] ),
FILTER(
ADDCOLUMNS(
SUMMARIZE( ALL(COVID), 'Calendar'[Date]),
"Amount", CALCULATE( SUM( COVID[Value] ) )
),
[Amount] < ThresholdValue
)
)
VAR DoublingTime = (CurrentDay - DayOfHalf) * 1
VAR Result = IF(AND( DoublingTime < 10000, DoublingTime > 0), DoublingTime)
RETURN
Result
Regards
Paul
This solution re-uses the one here: https://www.thebiccountant.com/2020/03/22/calculating-doubling-times-with-dax-in-power-bi/
I've tried it but it provides some puzzling results with no apparent time base.
For example, yesterday my doubling time across 8 months was 3 (3 what, months, weeks, years?) and today is one. I have a single value in a card then plot it across Months or Qs to see how it changes with growth.
To me, it would be useful to come up with something like this https://www.wallstreetmojo.com/doubling-time-formula/ (the standard formula for doubling time) and then have the answer displayed for your entire set or, on a graph with time as a dimension by pre-defined times/periods.
For exampe, using the rule of 72 (or 69):
For my data set, which measures electronic referrals from GPs into a hospital, and which varies day by day, week by week, and MoM, I can easily calculate DT from inception by calculating average monthly growth (e.g 20%) and getting a doubling time of 3.45 years by 0.69/0.2.
My current monthly average volume is 108 and I am at 1084 after 9 months, so to double to 1160 is another 10 months which doesn't make sense either