Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi!
I'm looking for a way to get a value from a previous row.
So in the example below Row 103 should look in Row 102 and get the value (129) from 'Cumul Backlog'.
I added the index/row because the timestamps are not continuous due to weekends and I thought it would be possible to refer to the current row -1 that way, but I am unable to retrieve the value.
How can I best approach this?
Thanks already for the help!
This would be the desired result:
Row | Previous Row | Ship Date | #Orders to Ship | # Orders Shipped | Cumul Backlog | New Measure |
103 | 102 | 8/09/2023 | 665 | 577 | 217 | 129 |
102 | 101 | 7/09/2023 | 785 | 957 | 129 | 301 |
101 | 100 | 6/09/2023 | 743 | 535 | 301 | 93 |
100 | 99 | 5/09/2023 | 692 | 853 | 93 | 254 |
Solved! Go to Solution.
@Eckhardt_david , you can try something like this:
prev_value =
CALCULATE (
MAX ( Table[Cumul_Backlog] ),
TOPN (
1,
FILTER (
ALLSELECTED ( Table ),
Table[Row] < MAX ( Table[Row] )
),
Table[Row]
)
)
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly. Appreciate your Kudos.
Check out my latest demo report in the data story gallery.
Stand with Ukraine!
Here are official ways you can support Ukraine financially (accounts with multiple currencies):
1) Support the Armed Forces of Ukraine: https://bank.gov.ua/ua/about/support-the-armed-forces
2) Come Back Alive foundation: https://www.comebackalive.in.ua/
Thank you!
Row number is unnecessary in your case.
Expertise = List.Accumulate( {Days as from Today}, {Skills and Knowledge}, (Current, Everyday) => Current & Day.LearnAndPractise(Everyday) ) |
Row number is unnecessary in your case.
Expertise = List.Accumulate( {Days as from Today}, {Skills and Knowledge}, (Current, Everyday) => Current & Day.LearnAndPractise(Everyday) ) |
@Eckhardt_david , you can try something like this:
prev_value =
CALCULATE (
MAX ( Table[Cumul_Backlog] ),
TOPN (
1,
FILTER (
ALLSELECTED ( Table ),
Table[Row] < MAX ( Table[Row] )
),
Table[Row]
)
)
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly. Appreciate your Kudos.
Check out my latest demo report in the data story gallery.
Stand with Ukraine!
Here are official ways you can support Ukraine financially (accounts with multiple currencies):
1) Support the Armed Forces of Ukraine: https://bank.gov.ua/ua/about/support-the-armed-forces
2) Come Back Alive foundation: https://www.comebackalive.in.ua/
Thank you!
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
23 | |
10 | |
10 | |
9 | |
7 |