Forum Discussion

Dangar332's avatar
Dangar332
Icon for Resident Rockstar rankResident Rockstar
3 years ago
Solved

How to find next date using measure

Greetings,

I have following table. i would like to find next date of current date using measure .

I am calculate it using adding new column to table but i don't know how to calculate using mesure

 

 

 

 

in above figure i have nextdate which is new added column  .but i want same output using measure

 

nextdate =
var currentdate = stock[date]
return
 MINX(FILTER(stock,stock[date]>currentdate),stock[date])
 

3 Replies

  • Greg_Deckler's avatar
    Greg_Deckler
    Icon for Community Champion rankCommunity Champion

    Dangar332 Try:

    nextdate =
    var currentdate = MAX(stock[date])
    return
     MINX(FILTER(stock,stock[date]>currentdate),stock[date])
    • Dangar332's avatar
      Dangar332
      Icon for Resident Rockstar rankResident Rockstar

      hi, Greg_Deckler   thank for reply

       

      when i use your code in measure and put in table it give nothing(blank)