Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
8 years ago
Solved

Next available date

Hi Team,

 

Need your help in creating a measure to select only next available date(highlighted in yellow) from column "Next upload" depending on the date in column "Last upload". Dates will change depending on the dump.

 

Thanks and regards

Abhijit

  • Anonymous's avatar
    Anonymous
    8 years ago

    Hi All,

     

    I am able to solve this issue.

     

    Here is the code:

     

    Next Upload Date =
    var currentDate = TODAY()
    var currentSF = MAX(Merge1[Data Sourcing Details])
    return
    CALCULATE(MIN(Merge1[Next Upload]),FILTER(ALL(Merge1),Merge1[Data Sourcing Details]=currentSF&&Merge1[Next Upload]>=TODAY()))

     

     

    Regards

    Abhijit

4 Replies

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hi Greg_Deckler,

       

      I am creating a new consolidate view where I just need immediate next date from Column "Next Upload" based on the date from "Last upload".

       

      Here is the view:

       

      Thanks

      Abhijit

      • Anonymous's avatar
        Anonymous
        Not applicable

        Hi Anonymous,

         

        Can you please share some sample data/pbix file for test and code formula? You can upload to onedrive or google drive and share file link here.

         

        Regards,

        Xiaoxin Sheng

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi All,

     

    I am able to solve this issue.

     

    Here is the code:

     

    Next Upload Date =
    var currentDate = TODAY()
    var currentSF = MAX(Merge1[Data Sourcing Details])
    return
    CALCULATE(MIN(Merge1[Next Upload]),FILTER(ALL(Merge1),Merge1[Data Sourcing Details]=currentSF&&Merge1[Next Upload]>=TODAY()))

     

     

    Regards

    Abhijit