Forum Discussion
HenryJS
Post Prodigy
6 years agoDAX: Return if column IS NULL
Hi all,
How do I add to the below statement IF 'Column' Is Null then count?
Candidate Calls =
VAR LatestMonday = today() - weekday(today(),2) + 1
RETURN max(0,calculate(COUNT('Export Actions'[CandidateRef]),'Export Actions'[ActionName] in {"Call - Check In","Call - Follow Up", "Call - Proactive Approach", "Call - Update"}, 'Export Actions'[ActionDate] >= LatestMonday))
5 Replies
- amitchandak
Super User
Which Column ?
- HenryJS
Post Prodigy
- BA_Pete
Super User
Hi HenryJS ,
It might be easier to add a column into the 'Export Actions' table:
ContactIsBlank = if( isblank( 'Export Actions'[Contact] ), 1, 0)Then do a count/sum on this column within other measures.
Not sure if this meets your requirements but much simpler than trying to write the logic into every other measure.
Pete
- V-lianl-msft
Community Support
Hi HenryJS ,"COUNTBLANK" function may help you solve this problem.If the problem persists,could you please share sample data or sample pbix?(Please mask any sensitive data before uploading)Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.