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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Anonymous
Not applicable

how to get the previous value taking into account other columns as a filter

DateValueTypeCategory
1/1/2020   10.11A
1/15/2020   10.22A
2/2/2020   10.32B
2/17/2020   10.42A

 

I have an table like that and I need to get the value before taking into account the columns Type and Category. Realize that I don't have values ​​for every day.

For example, if I'm analyzing the day 2/17/2020, the value is 10.4, type 2 and Category A. The Value Before this one has to be of the same type and category, so we need to take the 10.2 of the day 1/15/2020.

2 REPLIES 2
Jihwan_Kim
Super User
Super User

Picture1.png

 

https://www.dropbox.com/s/hq9txsnuvetkjqm/luizabolonha.pbix?dl=0 

 

 


If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.
Fowmy
Super User
Super User

@Anonymous 

Please use this as a calculated column: 

 

Column = 
var __date  = Table4[Date]
return
CALCULATE(
    MAX(Table4[Value]),
    ALLEXCEPT( Table4 , Table4[Type] , Table4[Category] ),
    Table4[Date] < __date
)

Fowmy_0-1625750124057.png

 

 

Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.