Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
Anonymous
Not applicable

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

@Anonymous 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. 



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


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

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



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


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.

Anonymous
Not applicable

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

 

Anonymous
Not applicable

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

@Anonymous 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



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


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.

Anonymous
Not applicable

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

@Anonymous 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.

 

 



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


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.

Anonymous
Not applicable

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
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

Find out what's new and trending in the Fabric Community.