Forum Discussion
ddurosier
6 years agoFrequent Visitor
Working with Filters and Lastnonblank
Hi all, was hoping someone can quickly help because I've been trying to figure this out yesterday. I have some extra filters I want to add but just want a head start on how to get that going. Basical...
- 6 years ago
maybe
VAR __last = MAXX(FILTER('Table',NOT(ISBLANK('Table'[comment])),[date])
RETURN
MAXX(FILTER('Table',[date]=__last),[comment])
ddurosier
6 years agoFrequent Visitor
I was able to get the result with this. Now, if I wanted to add additional filters such as "if comment table contains this" or "only if reporter is this person etc.", how would I incorporate that to this measure? Is not a big deal but was just curious.
Greg_Deckler
Community Champion
6 years agoSo,
VAR __last =
MAXX(
FILTER(
'Table',
( NOT(ISBLANK('Table'[comment]) || <some other condition> ) && <this condition also>
),
[date]
)
RETURN
MAXX(FILTER('Table',[date]=__last),[comment])
It's just logic that you can string together with || for OR and && for AND and you can use parens ( ) to group things.