cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
SaneleZwane
Frequent Visitor

Daily Percentage Growth not working

Good day,

I trust this message finds you well.

 

Please note I have created the measure as per your script however on my side the % is incorrect.

Please see screenshot below Previous day figure is 3 542, current day is 3 940. therefore (3 940-3 542)/ 3 542 = 11% however I am getting -0.99. 

SaneleZwane_0-1622116625594.png

 

 

Please assist....Im not understanding why I am getting the incorrect figure. Thanks

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@SaneleZwane , Try measure like this with date table joined iwth transaction date

 

This Day = CALCULATE(sum('order'[Qty]), FILTER(ALL('Date'),'Date'[Date]=max('Date'[Date])))
Last Day = CALCULATE(sum('order'[Qty]), FILTER(ALL('Date'),'Date'[Date]=max('Date'[Date])-1))

or
Last Day = CALCULATE(sum('order'[Qty]), previousday('Date'[Date]))

diff =[This Day] - [Last Day]


diff% =Divide([This Day] - [Last Day],[Last Day])

Did I answer your question? Mark my post as a solution! Appreciate your Kudos!! !!
Dashboard of My Blogs !! Connect on Linkedin

Learn Power BI Beginners !! Advance Power BI Concepts !! Power BI For Tableau User !! Learn Power BI in Hindi !!
Proud to be a Super User!

View solution in original post

3 REPLIES 3
amitchandak
Super User
Super User

@SaneleZwane , Try measure like this with date table joined iwth transaction date

 

This Day = CALCULATE(sum('order'[Qty]), FILTER(ALL('Date'),'Date'[Date]=max('Date'[Date])))
Last Day = CALCULATE(sum('order'[Qty]), FILTER(ALL('Date'),'Date'[Date]=max('Date'[Date])-1))

or
Last Day = CALCULATE(sum('order'[Qty]), previousday('Date'[Date]))

diff =[This Day] - [Last Day]


diff% =Divide([This Day] - [Last Day],[Last Day])

Did I answer your question? Mark my post as a solution! Appreciate your Kudos!! !!
Dashboard of My Blogs !! Connect on Linkedin

Learn Power BI Beginners !! Advance Power BI Concepts !! Power BI For Tableau User !! Learn Power BI in Hindi !!
Proud to be a Super User!

View solution in original post

Hi @amitchandak 

 

Thank you for the above calculation...it works perfectly :). Just a quick question...how do I make one for the Previous months last and and previous day. I appreciate your assistance.

Thanks Amitchankdak the calculation works. Just a quick question how would I then create the calculation to be dynamic? by that I mean currently the calculation works when my rows are a date field...how do I get it to work if my row is maybe a location? eg: Previous Day Sales and Current Day sales per Location, Client, Sales rep?

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Power BI October Update 2021.jpg

Power BI Release

Click here to read more about the October 2021 Release!

Teds Dev Camp Oct. 2021 768x460.jpg

Power BI Dev Camp - October 28th, 2021

Mark your calendars and join us for our next Power BI Dev Camp!