Forum Discussion
DAX Max Function with multiple conditions
- Anonymous4 years ago
HI NilR,
You can try to use follow measure formula to get the count of vote rows based on the current 'zip' and 'member' group of a specific year range:
measure = VAR voteCount = CALCULATE ( COUNTROWS ( Table ), FILTER ( ALLSELECTED ( Table ), [Vote] = "Y" && AND ( [INC Year] >= 202001, [INC Year] <= 202004 ) ), VALUES ( Table[Zip_Code] ), VALUE ( Table[Member] ) ) RETURN IF ( voteCount > 0, "Y", "N" )Regards,
Xiaoxin Sheng
NilR , Assume you have selected a duration in slicer a measure can help
Calculate(count(Table[Memeber]), filter(allselected(Table), Table[VOTE] ="Y" && Table[MEMBER] = max(Table[MEMBER])))
vote in selected duration
Thank you! I need the Y and No result for another measure to use. this doesn't work for me.
- amitchandak4 years ago
Super User
NilR , Not very clear
but this will give Y
if(not(isblank( Calculate(count(Table[Memeber]), filter(allselected(Table), Table[VOTE] ="Y" && Table[MEMBER] = max(Table[MEMBER]))) )) , "Y", Blank())
- NilR4 years ago
Post Patron
Thank you! I just updated my question with what I have tried and is not working .