Forum Discussion

jdugas's avatar
jdugas
Advocate I
9 years ago
Solved

Latest Value

Hi   I'm trying to show only the latest value based on latest date and can't quite figure out what to do. I've tried filtering using LASTDATE but that doesn't appear to be working.   Here's a sam...
  • tringuyenminh92's avatar
    9 years ago

    Hi jdugas,

     

    There are some solutions creating measure that will work with chart but not working in table, so my solution is focusing on group by data by Code and Max date column:

    • Create group by table with 2 column Code and Max YearMonth of that code
    Lastest = SUMMARIZE(Data,Data[Code],"YearMonth",MAX(Data[YearMonth]))
    • Join original table with above table to get the value
    Lastest Values = SUMMARIZE( FILTER(CROSSJOIN(Data,Lastest),Data[Code]=Lastest[Code] && Data[YearMonth]=Lastest[YearMonth]),Data[Code],Data[YearMonth],Data[FIValue])

     

     

    If this works for you please accept it as solution and also like to give KUDOS.

    Best regards
    Tri Nguyen