Forum Discussion
Dax Help on showing 0 Count for Column Chart
I am trying the following for Y Axis on a chart but not seeing any months of 0 count like I want. How could I tweak this?
Hi bdehning
If the graph is based on a date table.
try to modify
VAR __Result = IF(__RT = 0, BLANK(), __Count)
to just __Count
if the result is blank()
the months are not shown..another option is to use
"show items without data"If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly
Hi bdehning
There is a link for a more efficient method to handle the blanks/0 issues.https://www.youtube.com/watch?v=_cT9PB72fu8&t=1537s
if it doesn't help
Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).
https://community.powerbi.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-...
Please show the expected outcome based on the sample data you provided.
https://community.powerbi.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly
Hi bdehning
Again without data, I am not sure that I understand you correctly.
If you want to filter out dates that are after the last date in the fact table,
You can create flag measure like:
flag = if (MAX('CalendarTable'[Dates])<= MAX ( 'LossRun'[Loss Date] ) && (min('CalendarTable'[Dates])>= min ( 'LossRun'[Loss Date] ),1,0)
and use this flag as a filter on the graphHopefully, it can help...
If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly
Hi bdehning
Yes, and I must admit that I didn't understand the model.
There are many to many relationships,
The fact table doesn't relate to the calendar...
Very strange measure.Sorry, the issue is much deeper than the question that you asked.
18 Replies
- Ritaf1983
Super User
Hi bdehning
If the graph is based on a date table.
try to modify
VAR __Result = IF(__RT = 0, BLANK(), __Count)
to just __Count
if the result is blank()
the months are not shown..another option is to use
"show items without data"If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly
- bdehning
Post Prodigy
Of course if I use VAR __Result = __Count, I am back to my original issue of having 0's for months outside the time they are with the company.
- Ritaf1983
Super User
Hi bdehning
There is a link for a more efficient method to handle the blanks/0 issues.https://www.youtube.com/watch?v=_cT9PB72fu8&t=1537s
if it doesn't help
Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).
https://community.powerbi.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-...
Please show the expected outcome based on the sample data you provided.
https://community.powerbi.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly
- bdehning
Post Prodigy
I followed the video and got fairly close except I want to get to this, down to Month level, which has been my challenge. This Chart, if working, should start from August 2022 for this customer.