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

Return the value from the next matching row

Hello Team,

 

I have a table with different country - category and also frequencies. Currently I have just shown one below as an example. As we may have other country and category data and the order of the data might mismatch when we have all the country/category data.
So the "Month of data" Column refers to the data which is being validated in the current month.

For Eg: Region = IMEA, Country = India, Category = I
If "Month of Data" = January 18, then the data is being validated and is available on 27th Feb 2018(Expected Data of Input Column). But I wanted another result column where for the same filters Region = IMEA, Country = India, Category = I ,
I want the next date that is present in the Expected Data of Input Column and this will be 28th Mar 2018.

I want my results as seen in the "Output result" Column. 
Note: The order of all the columns changes accordingly, so please suggest a way to get this result keeping in account of Country, Category, and other related fileds.

 

 

A sample excel file dataA sample excel file data

 Kindly suggest a method of approach.

 

 

1 ACCEPTED SOLUTION
Zubair_Muhammad
Community Champion
Community Champion

@Anonymous

 

Try something on this pattern

 

Calculated column =
CALCULATE (
    MIN ( Table1[Date] ),
    FILTER (
        ALLEXCEPT ( Table1, Table1[Region], Table1[Country], Table1[Category] ),
        Table1[Date] > EARLIER ( [Table1[Date] )
    )
)

View solution in original post

2 REPLIES 2
Zubair_Muhammad
Community Champion
Community Champion

@Anonymous

 

Try something on this pattern

 

Calculated column =
CALCULATE (
    MIN ( Table1[Date] ),
    FILTER (
        ALLEXCEPT ( Table1, Table1[Region], Table1[Country], Table1[Category] ),
        Table1[Date] > EARLIER ( [Table1[Date] )
    )
)
Anonymous
Not applicable

@Zubair_Muhammad Thank you for the solution. It worked 🙂 Man Happy

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

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!

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.

Top Solution Authors