Forum Discussion
jdugas
9 years agoAdvocate I
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...
- 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
tringuyenminh92
9 years agoMemorable Member
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
Oscar_Mtz_V
8 years agoKudo Commander
Thanks!!! Great Answer!!!