Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hi All,
Need you help for one of my task.
I want to know Which day recorded the maximum volume growth compared to previous day.
I have added previous day column using
| Date | Total Sales | PreviousDaySales |
| 2/1/2020 | 235 | |
| 2/2/2020 | 142 | 235 |
| 2/3/2020 | 150 | 142 |
| 2/4/2020 | 167 | 150 |
| 2/5/2020 | 141 | 167 |
| 2/6/2020 | 197 | 141 |
| 2/7/2020 | 244 | 197 |
| 2/8/2020 | 254 | 244 |
| 2/9/2020 | 281 | 254 |
| 2/10/2020 | 245 | 281 |
| 2/11/2020 | 195 | 245 |
| 2/12/2020 | 202 | 195 |
| 2/13/2020 | 210 | 202 |
| 2/14/2020 | 118 | 210 |
| 2/15/2020 | 71 | 118 |
| 2/16/2020 | 200 | 71 |
| 2/17/2020 | 148 | 200 |
| 2/18/2020 | 162 | 148 |
| 2/19/2020 | 242 | 162 |
| 2/20/2020 | 279 | 242 |
| 2/21/2020 | 299 | 279 |
| 2/22/2020 | 197 | 299 |
| 2/23/2020 | 187 | 197 |
| 2/24/2020 | 155 | 187 |
| 2/25/2020 | 158 | 155 |
| 2/26/2020 | 142 | 158 |
| 2/27/2020 | 252 | 142 |
| 2/28/2020 | 247 | 252 |
| 2/29/2020 | 270 | 247 |
| 3/1/2020 | 290 | 270 |
| 3/2/2020 | 286 | 290 |
| 3/3/2020 | 132 | 286 |
| 3/4/2020 | 242 | 132 |
| 3/5/2020 | 123 | 242 |
| 3/6/2020 | 128 | 123 |
| 3/7/2020 | 88 | 128 |
| 3/8/2020 | 323 | 88 |
| 3/9/2020 | 255 | 323 |
| 3/10/2020 | 228 | 255 |
| 3/11/2020 | 209 | 228 |
| 3/12/2020 | 195 | 209 |
Solved! Go to Solution.
Hi @Anonymous
Please refer to sample file with the proposed solution. I assumed that the presented data is aggregated at day level, therefore the measure is built from scratch
Max Date Growth =
VAR T1 =
ADDCOLUMNS (
VALUES ( Data[Date] ),
"@Total",
CALCULATE ( SUM ( Data[Total ] ) ),
"@Previous",
VAR CurrentDate = Data[Date]
VAR CurrentValue = CALCULATE ( SUM ( Data[Total ] ) )
RETURN
CALCULATE ( SUM ( Data[Total ] ), Data[Date] = CurrentDate - 1 )
)
VAR T2 = FILTER ( T1, [@Previous] <> BLANK ( ) )
VAR T3 = ADDCOLUMNS ( T2, "@Growth", [@Total] - [@Previous] )
VAR T4 = TOPN ( 1, T3, [@Growth] )
RETURN
MAXX ( T4, [Date] )
Hi, @Anonymous
You can try the following methods.
Measure:
PreviousDaySales =
Var PrevDate=MAXX(FILTER(ALL('Table'[Date]),'Table'[Date]<SELECTEDVALUE('Table'[Date])),[Date])
Var PreviousDaySales=CALCULATE(SUM('Table'[Total Sales]),FILTER(ALL('Table'),[Date]=PrevDate))
Return
PreviousDaySalesGrowth = SUM('Table'[Total Sales])-[PreviousDaySales]MaxGrowthDate =
Var MaxGrowth=MAXX('Table',[Growth])
Return
MAXX(FILTER(ALL('Table'),[Growth]=MaxGrowth),[Date])
Best Regards,
Community Support Team _Charlotte
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Thank you for your reply. it workes for me!!!
Hi @Anonymous
Please refer to sample file with the proposed solution. I assumed that the presented data is aggregated at day level, therefore the measure is built from scratch
Max Date Growth =
VAR T1 =
ADDCOLUMNS (
VALUES ( Data[Date] ),
"@Total",
CALCULATE ( SUM ( Data[Total ] ) ),
"@Previous",
VAR CurrentDate = Data[Date]
VAR CurrentValue = CALCULATE ( SUM ( Data[Total ] ) )
RETURN
CALCULATE ( SUM ( Data[Total ] ), Data[Date] = CurrentDate - 1 )
)
VAR T2 = FILTER ( T1, [@Previous] <> BLANK ( ) )
VAR T3 = ADDCOLUMNS ( T2, "@Growth", [@Total] - [@Previous] )
VAR T4 = TOPN ( 1, T3, [@Growth] )
RETURN
MAXX ( T4, [Date] )
Hi @Anonymous
Here's a measure that uses the TOPN function to find the largest volume growth
Date with Max Volume Growth =
MAXX(
TOPN(1,
FILTER('Table', NOT ISBLANK('Table'[PreviousDaySales])),
'Table'[Total Sales] - 'Table'[PreviousDaySales], DESC
),
'Table'[Date]
)
The FILTER makes sure it doesn't return the first date in the data (that has no previous day sales). The MAXX will get the latest date in the event there's more than 1 date with the largest volume growth. You could use MINX if you wanted the earliest instead.
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
| User | Count |
|---|---|
| 21 | |
| 10 | |
| 9 | |
| 4 | |
| 4 |
| User | Count |
|---|---|
| 35 | |
| 31 | |
| 20 | |
| 13 | |
| 11 |