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

Level up your Power BI skills this month - build one visual each week and tell better stories with data! Get started

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
April Power BI Update Carousel

Power BI Monthly Update - April 2026

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

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.