Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

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.

Reply
ManuelEspitia
Helper II
Helper II

Calculate daily percentage growth (Covid 19 Colombia)

Hello

I need to calculate the daily percentage variation of Covid19 cases. I have the measures of daily cases and cumulative cases. How can I calculate the percentage variation of each day, of those two measures?

Thanks for the help.

Captura1.JPG

2 ACCEPTED SOLUTIONS
jdbuchanan71
Super User
Super User

@ManuelEspitia 

You can use a variable to calculate the previous days value for your measure and show the % change like so:

Cases % change from prior day = 
VAR _pd = CALCULATE ( [Confirmed Cases], DATEADD('cases'[Date],-1,DAY) )
RETURN
DIVIDE([Confirmed Cases],_pd)-1

jdbuchanan71_0-1595971154280.png

 

View solution in original post

If you don't you get the ratio rather than the growth.

Take 11 vs 10

11/10 = 110%

110% - 1 = 10% growth

View solution in original post

4 REPLIES 4
jdbuchanan71
Super User
Super User

@ManuelEspitia 

You can use a variable to calculate the previous days value for your measure and show the % change like so:

Cases % change from prior day = 
VAR _pd = CALCULATE ( [Confirmed Cases], DATEADD('cases'[Date],-1,DAY) )
RETURN
DIVIDE([Confirmed Cases],_pd)-1

jdbuchanan71_0-1595971154280.png

 

@jdbuchanan71Hi. Why do we add -1 after the Divide function between the confirmed_cases and the variable?

If you don't you get the ratio rather than the growth.

Take 11 vs 10

11/10 = 110%

110% - 1 = 10% growth

Great, that's how it was, thank you.

Do you know now how can I get the case growth factor out? Here's how I have the model now:

Captura1.JPG

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

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.