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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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] )
    )
)

Regards
Zubair

Please try my custom visuals

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] )
    )
)

Regards
Zubair

Please try my custom visuals
Anonymous
Not applicable

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

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.