Forum Discussion

MartinC's avatar
MartinC
Helper I
2 years ago
Solved

Identify next date in a row

Hi All!   I've done a search and couldn't find an answer to what I'm looking for.  Using the table below, I need to identify which activity is next (i.e. after Today()).  For example using todays d...
  • Anonymous's avatar
    Anonymous
    2 years ago

    Hi MartinC ,

     

    According to your description, here are my steps you can follow as a solution.

    (1) This is my test data. 

    (2) In order not to affect the original datasheet, we can copy a datasheet and then select all the columns and right-click on the unpivot column.

     

    (3) We can create a measure and then the result is as follows.

    Measure = 
    var _a=MINX(FILTER(ALL('Table (2)'),[Value]>TODAY()),[Value])
    RETURN CALCULATE(MAX('Table (2)'[Attribute]),FILTER(ALL('Table (2)'),[Value]=_a))

     

    If the above one can't help you get the desired result, please provide some sample data in your tables (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It is better if you can share a simplified pbix file. Thank you.

     

    Best Regards,

    Neeko Tang

    If this post  helps, then please consider Accept it as the solution  to help the other members find it more quickly.