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!Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!
Need a funtion or logic to read a previous row, for instance:
How can you see Do I need is to sum up the previos record and build a new column with those values
Appreciate your help!!
Solved! Go to Solution.
I think this calculated column would work.
See the attached sample file as well
Calculated Column =
VAR PreviousRow =
TOPN (
1,
FILTER (
Table1,
Table1[Month] < EARLIER ( Table1[Month] )
&& Table1[Employee] = EARLIER ( Table1[Employee] )
),
[Month], DESC
)
VAR PreviousValue =
MINX ( PreviousRow, [Sales] )
RETURN
Table1[Sales] + PreviousValueHi,
I am really sorry for the inconvenience that occurred. Just forget about the first dataset I shared. In my previous email, I shared a Google sheet link with the dataset. Hope that would be helpful.
I still do n ot understand at all. Sorry.
I think this calculated column would work.
See the attached sample file as well
Calculated Column =
VAR PreviousRow =
TOPN (
1,
FILTER (
Table1,
Table1[Month] < EARLIER ( Table1[Month] )
&& Table1[Employee] = EARLIER ( Table1[Employee] )
),
[Month], DESC
)
VAR PreviousValue =
MINX ( PreviousRow, [Sales] )
RETURN
Table1[Sales] + PreviousValue@Zubair_Muhammad
Can we easly rebuilt this to get value from FIRST existing row? I tried by MIN etc. in my case i have date, not only month. SO i want get value with first date.
Try this Column
Column =
VAR PreviousRow =
TOPN (
1,
FILTER ( Table1, Table1[Column A] < EARLIER ( Table1[Column A] ) ),
[Column A], DESC
)
VAR PreviousValue =
MINX ( PreviousRow, [Column B] )
RETURN
Table1[Column B] + PreviousValue
Vote for your favorite vizzies from the Power BI World Championship submissions!
If you love stickers, then you will definitely want to check out our Community Sticker Challenge!
Check out the January 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 56 | |
| 52 | |
| 45 | |
| 17 | |
| 16 |
| User | Count |
|---|---|
| 108 | |
| 107 | |
| 39 | |
| 33 | |
| 25 |