Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more.
Get startedGrow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.
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 / Not overdue] column.
My Current DAX:
Solved! Go to Solution.
This one fixed my problem.
This one fixed my problem.
Hi, The below screenshot explains my issue. For some of my NoOverdue has no values which results blank Percentage values. which is why I'm not getting continues line graph.
Sorry for the delayed respose. Many thanks
I get error when I try to create a variable with return function.
Hi @Anonymous ,
Could you tell me if your problem has been solved?
If it is, kindly Accept it as the solution. More people will benefit from it.
Or you are still confused about it, please provide me with more details about your table and your problem or share me with your pbix file from your Onedrive for Business.
Best Regards,
Stephen Tao
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.
@Anonymous , Try like
divide(CALCULATE(count(CM[ID]),CM[Overdue / Not overdue]="Not Overdue") , CALCULATE((COUNT(CM[ID]))),0)
Or
divide(CALCULATE(count(CM[ID]),CM[Overdue / Not overdue]="Not Overdue") , CALCULATE((COUNT(CM[ID]))),0) +0
Hi,
Both approachs are not working.
1st one had no changes
2nd one all value remains zero. any other help?
@Anonymous ,Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.
@Anonymous You can always just add 0 to the measure, but this will impact how it behaves with filters and will show 0 for any scenario where values are blank/missing (which is what you asked) but if you want to apply other filters, just come back with more info and we can help.
My Current DAX:
Copying DAX from this post? Click here for a hack to quickly replace it with your own table names
Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C
I work as a Microsoft trainer and consultant, specialising in Power BI and Power Query.
www.excelwithallison.com
User | Count |
---|---|
86 | |
84 | |
69 | |
67 | |
55 |
User | Count |
---|---|
125 | |
100 | |
90 | |
84 | |
66 |