Forum Discussion
Anonymous
5 years agoNot applicable
Is Blank DAX
Hi, I've below DAX but I'm not getting continues line on visual. How to input 0 if my values are blank/missing. I"m doing Count of ID from CM table with filtered by Not Overdue from [Overdue / N...
- Anonymous5 years ago
This one fixed my problem.
% Completion = if(ISBLANK([NotOverDue])&& NOT(ISBLANK([Overdue_CM])),0,CALCULATE(COUNT(CM[ID]),CM[Overdue / Not overdue]="Not Overdue")/CALCULATE((COUNT(CM[ID]))))
Anonymous
5 years agoNot applicable
Hi Anonymous ,
It is suggested to use DIVIDE function. The DIVIDE function was designed to automatically handle division by zero cases. If an alternate result is not passed in, and the denominator is zero or BLANK, the function returns BLANK. When an alternate result is passed in, it's returned instead of BLANK.
Try this:
VAR tt =
DIVIDE (
CALCULATE ( COUNT ( CM[ID] ), CM[Overdue / Not overdue] = "Not Overdue" ),
CALCULATE ( ( COUNT ( CM[ID] ) ) )
)
RETURN
IF ( ISBLANK ( tt ), 0, tt )
Best Regards,
Stephen Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.