Forum Discussion
Anonymous
5 years agoNot applicable
DAX Measure
I am looking for Measure where I need COUNT of sessionId, where recordingId is not blank and examId is blank.
Do we use COUNTAX and COUNTBLANK toge
Hey Anonymous ,
you can just use a CALCULATE and change the filter context for what you want:
Count Measure = CALCULATE( COUNT( myTable[SessionID] ), myTable[recordingID] <> BLANK() && myTable[examId] = BLANK() )If you need any help please let me know.If I answered your question I would be happy if you could mark my post as a solution ✔️ and give it a thumbs up 👍Best regardsDenisBlog: WhatTheFact.biFollow me: twitter.com/DenSelimovic
3 Replies
- selimovdMost Valuable Professional
Hey Anonymous ,
you can just use a CALCULATE and change the filter context for what you want:
Count Measure = CALCULATE( COUNT( myTable[SessionID] ), myTable[recordingID] <> BLANK() && myTable[examId] = BLANK() )If you need any help please let me know.If I answered your question I would be happy if you could mark my post as a solution ✔️ and give it a thumbs up 👍Best regardsDenisBlog: WhatTheFact.biFollow me: twitter.com/DenSelimovic - AnonymousNot applicable
Thank you, Denis! That worked well and is efficient.
I also tried using FILTER instead and that was too long.- selimovdMost Valuable Professional
Hey Anonymous ,
you could also use filter. In this case you will just get a value if this combination is valid.
Check it out:
Count Measure = CALCULATE( COUNT( myTable[SessionID] ), FILTER( myTable, myTable[recordingID] <> BLANK() && myTable[examId] = BLANK() ) )If you need any help please let me know.If I answered your question I would be happy if you could mark my post as a solution ✔️ and give it a thumbs up 👍Best regardsDenisBlog: WhatTheFact.biFollow me: twitter.com/DenSelimovic