Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Anonymous
Not applicable

Show previous rows based on value and slicer

I have this table

SebastianRdrgz_0-1611666089648.png

 

I want to add a table that shows the rows with the previous value, based on  a slicer.

 

For example, if i put 3 in my slicer, i want a table that shows me this information

 

SebastianRdrgz_1-1611668281512.png

 

 

1 REPLY 1
amitchandak
Super User
Super User

@Anonymous , Create an independent table of value and use that as filter , use this measure with other two columns

calculate(countrows(Table), filter(Table, Table[value] = selectedvalue(value[value])-1))

 

if values is from the same tbale

calculate(countrows(Table), filter(all(Table), Table[value] = selectedvalue(Table[value])-1))

Helpful resources

Announcements
PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

Top Solution Authors