cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
gpgmtg
New Member

Include count = 0 in a bar chart

I have a bar chart in a report which displays every day what is the previous day's ID count for different clients.
In the axis I have clients,
in the legend, I have the date field(month to show which month the previous day count belongs), and
in values, I have a count of IDs. 

Problem: If the count of ID for one user =0 for the previous day, that user is not displayed in that chart. I would like to display the user in x-axis showing count=0
Current data table:

ClientSeptember
a3
b5
c4
d8
e9

 

What I want is the data table to show the count =0 for client f. 

ClientSeptember
a3
b5
c4
d8
e9
0


Failed Attempts:
1) For Axis, where I have different clients, I ticked "show Items with no data". Nothing changed in my graph

2) I created a new measure ID_COUNT= COUNT(TABLE[ID]) + 0, this showed me a lot of 0 on my report for other months and this is not what I want. I want the count = 0 for the client on the previous day

8 REPLIES 8
parry2k
Super User
Super User

@gpgmtg this is not going to help, it is going to be a data modelling/auto exists issue, you need to create a sample pbix file and share, just change the value, create a sample dataset but make sure the data model is the same as your original file. 






Did I answer your question? Mark my post as a solution.

Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.





parry2k
Super User
Super User

@gpgmtg share the pbix file, seems like this is an issue with the model, do you have a dimension that have list of all customers?






Did I answer your question? Mark my post as a solution.

Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.





Hi, I cant share the .pbix file as it has confidential data. I can share my power bi report with filters shown. I have only one dataset and no joins with another table. My data has a column user having values from user1 - user 7. since user7 has count =0, I cant see that in a bar chart above. 
I have not created any measures and using data as is. counting ID per user basis for every previous day (using relative date function). Below is the snapshot:

gpgmtg_0-1632777485030.png

 

gpgmtg
New Member

Can anyone help me with the data table (ultimately the bar chart) to display count =0 for a respective client?

parry2k
Super User
Super User

@gpgmtg ah! not sure if you can show the bar if value is zero, what happens if you put a data label , does it show 0






Did I answer your question? Mark my post as a solution.

Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.





When I convert the bar chart into a table, it doesn't show the client who has count =0. I am sure, next day if the count is a valid number >0 for the client, the report will work. It's just not working/showing  the count = 0 for any client in that axis

parry2k
Super User
Super User

@gpgmtg you are on right track to do +0 but ofcourse it will show a lot of zeros, follow this post to solve it.

 

Follow us on LinkedIn

 

Check my latest blog post The Power of Using Calculation Groups with Inactive Relationships (Part 1) (perytus.com) I would  Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos to whoever helped to solve your problem. It is a token of appreciation!

 

Visit us at https://perytus.com, your one-stop-shop for Power BI-related projects/training/consultancy.

 

 






Did I answer your question? Mark my post as a solution.

Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.





Thanks Parry, I don't have any blanks in my ID column. When the count of ID for a client is 0, it isn't showing that client in the first place. i don't understand how to show the client and have no bar against that client since it has count =0

Helpful resources

Announcements
2022 Release Wave 1 760x460.png

2022 Release Wave 1 Plan

Power Platform release plan for the 2022 release wave 1 describes all new features releasing from April 2022 through September 2022.

Power BI December 2021 Update_carousel 768x460.jpg

Check it Out!

Click here to read more about the December 2021 Updates!

Top Solution Authors