Skip to main content
cancel
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.

Reply

DOUBLING TIME FOR COVID-19 CASES

Spoiler
 

@amitchandak 

HI CAN ANYONE SUGGEST HOW TO PLOT DOUBLING TIME IN COVID-19 DATA 

MY DATA FOR CONFIRMED , DISCHARGED AND ACTIVE CASE IS IN SINGLE COLLUMN AS TEXT FIELD

THAN

8 REPLIES 8

STILL WAITING FOR THE SOLUTION !

amitchandak
Super User
Super User

@drnareshchauhan , interesting problem. Can you share sample data and sample output in a table format? Or a sample pbix after removing sensitive data.

@drnareshchauhan 

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

@V-pazhen-msft 

thanks 

I have this report file of county, thanks to you but this doesn't work for me

becase the value in the given file of yours is the cumulative value, where in my data similar column is [new confirmed] which is daily occurence of cases date wise , i did running total to get the cumulative (threshold value) but your above solution willl not take that calculated measure [ ].

and when I tried to add running column it turned out some weird values in millions 

thanks

how to attach file here

@drnareshchauhan Read this post to get your answer quickly.

https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.