Forum Discussion
WoW % Growth Rate
Hello everyone,
I am trying to calculate the week on week growth rate for a sales report (revenue) and can't seem to find a formula that works. I am looking to compare same periods, so for example if today would be wednesday I would like to compare it to last week same time period (monday-Wed). I am also quite new to using DAX so I would appreciate any help!
I would like to specify that the data set which I use contains a column for Revenue (lets call it "Revenue") , a column for date (dd-mm-yyyy format), a column with weekday, one for week number and one for year.
So technically, as far as I have seen on the forum, since I have this info already in the dataset I don't need to extract it to create a separate table or ?
Thanks to everbody for the help!!!
2 Replies
- AnonymousNot applicable
Hi AlexandraStk ,
Based on your dataset, you could create a measure to return WoW% Grouth Rate:
WoW % Growth Rate = var _pre=CALCULATE(SUM('Table'[Revenue]),FILTER(ALL('Table'),[Year]=MAX('Table'[Year])&&[Weeknum]=MAX('Table'[Weeknum])-1&&[Weekday]<=MAX('Table'[Weekday]))) var _cur=CALCULATE(SUM('Table'[Revenue]),FILTER(ALL('Table'),[Year]=MAX('Table'[Year])&&[Weeknum]=MAX('Table'[Weeknum])&&[Weekday]<=MAX('Table'[Weekday]))) return DIVIDE(_cur-_pre,_pre)Best Regards,
Stephen Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- Mrxiang
Helper II
For the week on week growth rate, you can use the DAX formula SUMX3(FILTER(table, WEEKDAY(date) = WEEKDAY(GETDATE())), revenue, 1). Replace table with your table name and GETDATE() with a cell reference containing the current date. The SUMX3 function calculates the sum of the products of the three arguments. The first argument is the filtered table, the second argument is revenue, and the third argument is 1 (the row number). This formula will give you the growth rate for each day of the week compared to the same day of the previous week.