Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago
Solved

undefined

I have a dimention table as below. product code is type text, monthyear is type date, MRP is type decimal, flag is type text.   ProductCode MonthYear MRP Flag 123 jan,2022 10 NO 123 ...
  • Anonymous's avatar
    Anonymous
    3 years ago

    Hi Anonymous 

    You can try the following code:

    End Date = IF([Flag]="Yes",BLANK(),MAXX(FILTER('Table','Table'[ProductCode]=EARLIER('Table'[ProductCode])&&[Flag]="Yes"),[MonthYear])-1)

     

    Best Regards!

    Yolo Zhu

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