7 Replies Latest reply on May 25, 2020 12:36 AM by Mahfooj Khan

# Number of days wise sum of confirmed case for separate countries

Hi All,

In the covid19 data, I want number of days wise sum of confirmed case for separate countries. Note start date for each countries are different. Number of days means for the first 5 or 10 days etc.

i.e for 5, 10, 100, 1000 days what is the cumulative confirmed case country wise? For these 5,10,100 and 1000 days I will be creating a parameter.

how to approach the rest?

Thanks,

Ankush

• ###### 1. Re: Number of days wise sum of confirmed case for separate countries

Hi,

Try this,

It will calculate from day since first outbreak.

DATE([Date]) - DATE({FIXED [Country] : MIN(IF [Confirmed Cases] >=1 THEN [Date] END)})

Let us know if this help.

Mahfooj

• ###### 2. Re: Number of days wise sum of confirmed case for separate countries

Hi Mahfooj,

From DATE({FIXED [Country] : MIN(IF [Confirmed Cases] >=1 THEN [Date] END)}) I am able to get the start date for each countries.

But I want,  say for 100 cases(input through parameter) how many days each countries have taken to achieve that in a bar graph?

Thanks,

Ankush

• ###### 3. Re: Number of days wise sum of confirmed case for separate countries

Hi,

Try this,

DATEDIFF('day',

DATE({FIXED [Country ] : MIN(IF [Confirmed Cases]>=1 THEN [Date] END)})

,

DATE({FIXED [Country ] : MAX(IF [Confirmed Cases]<=100 THEN [Date] END)})

)+1

Parameterized the 100 cases input.

Note: You might not get exactly on which day 100 cases identified though above calculation will find the closest date when <=100 cases are identified.

Let us know if this help.

Mahfooj

• ###### 4. Re: Number of days wise sum of confirmed case for separate countries

Mahfooj,

I don't on which day 100 cases identified, but i want number of days the country took to pass 100 confirmed cases.

Thanks,

Ankush

• ###### 5. Re: Number of days wise sum of confirmed case for separate countries

Hi,

Have you tried the calculation which I've given?

I have already validated at my end and this is my observation. Below screenshot showing how many days Chile took to reach 100 confirmed cases. Final output, Countries which are not reached 100 cases showing as blank at the top in the screenshot. Let us know if I'm wrong.

Mahfooj

1 of 1 people found this helpful
• ###### 6. Re: Number of days wise sum of confirmed case for separate countries

Hey Mahfooj,

Thanks... It worked.

Earlier I was showing all the countries in same graph, confirmed cases input through parameter.

Now is it possible to show on which day N confirmed cases crossed for particular countries shown in below image: Regards,

Ankush

 XYZ Country Confirmed   Cases Days taken to Cross 100 >= 46 1000 >= 61 5000 >= 70 10000 >= 76
• ###### 7. Re: Number of days wise sum of confirmed case for separate countries

Hi,

Try this,

[Cases Bin]:

IF [Confirmed]>=10000 THEN '>=10000'

ELSEIF [Confirmed]>=5000 THEN '>=5000'

ELSEIF [Confirmed]>=1000 THEN '>=1000'

ELSEIF [Confirmed]>=100 THEN '>=100'

END

Days Taken to Cross N Cases

DATEDIFF('day',{FIXED [Country ]:MIN(IF [Confirmed]>=1 THEN [Date] END)}

,{FIXED [Country ],[Cases Bin]: MIN(IF [Confirmed]>=1 THEN [Date] END)}

)+1

Use above calculated fields in your view to validate. At row level validation Hope this will help.

Mahfooj