This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. We're covering it all. You won't want to miss it.
Learn moreLevel up your Power BI skills this month - build one visual each week and tell better stories with data! Get started
I have a problem to ask for your help, my friend.
like this table,
If this row and the previous row are the same salesperson, calculate the current and previous day's growth rate, if this row and the previous row are not the same, return null.
How do I write this function? Use the DAX function.
I'm sorry that my English is very poor, so I can only describe it through translation tools.
Thank you for your answer.
| Salesman | Day | Sales volume | Day of growth |
| Bill | 2021/1/1 | 536 | |
| Bill | 2021/1/2 | 874 | 63.06% |
| Bill | 2021/1/3 | 797 | -8.81% |
| Bill | 2021/1/4 | 606 | -23.96% |
| Bill | 2021/1/5 | 784 | 29.37% |
| Bill | 2021/1/6 | 675 | -13.90% |
| Bill | 2021/1/7 | 714 | 5.78% |
| Bill | 2021/1/8 | 730 | 2.24% |
| John | 2021/1/1 | 775 | |
| John | 2021/1/2 | 519 | -33.03% |
| John | 2021/1/3 | 794 | 52.99% |
| John | 2021/1/4 | 958 | 20.65% |
| John | 2021/1/5 | 548 | -42.80% |
| John | 2021/1/6 | 944 | 72.26% |
| John | 2021/1/7 | 655 | -30.61% |
| John | 2021/1/8 | 656 | 0.15% |
| Bob | 2021/1/1 | 867 | |
| Bob | 2021/1/2 | 523 | -39.68% |
| Bob | 2021/1/3 | 734 | 40.34% |
| Bob | 2021/1/4 | 906 | 23.43% |
| Bob | 2021/1/5 | 567 | -37.42% |
| Bob | 2021/1/6 | 906 | 59.79% |
| Bob | 2021/1/7 | 851 | -6.07% |
| Bob | 2021/1/8 | 503 | -40.89% |
Solved! Go to Solution.
@sanshushu , Try a new column
new column =
var _max = maxx(filter(Table, [salesman] = earlier([salesman]) && [Day] < earlier([Day]) ), [Day])
var _vol = maxx(filter(Table, [salesman] = earlier([salesman]) && [Day] =_max ) ), [Sales volume])
return
if(isblank(_max), blank() , divide([Sales volume]-_vol,_vol))
refer for more options
Day Intelligence - Last day, last non continous day
https://medium.com/@amitchandak.1978/power-bi-day-intelligence-questions-time-intelligence-5-5-5c324...
@sanshushu , Try a new column
new column =
var _max = maxx(filter(Table, [salesman] = earlier([salesman]) && [Day] < earlier([Day]) ), [Day])
var _vol = maxx(filter(Table, [salesman] = earlier([salesman]) && [Day] =_max ) ), [Sales volume])
return
if(isblank(_max), blank() , divide([Sales volume]-_vol,_vol))
refer for more options
Day Intelligence - Last day, last non continous day
https://medium.com/@amitchandak.1978/power-bi-day-intelligence-questions-time-intelligence-5-5-5c324...
Check out the April 2026 Power BI update to learn about new features.
Sign up to receive a private message when registration opens and key events begin.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
| User | Count |
|---|---|
| 36 | |
| 28 | |
| 28 | |
| 20 | |
| 18 |
| User | Count |
|---|---|
| 65 | |
| 35 | |
| 34 | |
| 25 | |
| 24 |