Forum Discussion
alexbjorlig
Helper IV
5 years agoHow to filter table with latest day, dynamically?
Hi everyone. Still trying to understand the basics of CALCULATE and filter context. This problem is really hard for me to solve, so looking forward to your input/solutions. My objective is to bu...
- 5 years ago
alexbjorlig
You have built the correct logic but you don't need to iterate over the fact table.
I modified your measure:Latest = VAR __category = MAX('fact'[category]) VAR __maxdate = CALCULATE( MAX('fact'[date] ) , ALLSELECTED('fact' ) , 'fact'[category] = __category ) return INT ( max('fact'[date]) = __maxdate )
alexbjorlig
Helper IV
5 years agoHi KasunManchanaya - thanks for giving it a try, but does not seem to work.
I don't think it's possible to use a calculated column, because the value is only calculated once, and does not dynamically adopt.
KasunManchanaya
5 years agoRegular Visitor
If there is a filter requirement CC will not help you. then you have to do it in the measure itself. I will give it a try and let you know.