Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi All,
I want to show zero values in bar chart. Please find the sample data and the screenshot.
Answer text field is dimension and sector field is filter in the report..
Below is the measure I am using in Bar chart :
Thanks in advance
Solved! Go to Solution.
Hi @Kavya123 ,
Create a sector table, then create a relationship with the fact table and use it as axis.
Table 2 = DISTINCT('Table'[Sector])
Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Kavya123 ,
Create a sector table, then create a relationship with the fact table and use it as axis.
Table 2 = DISTINCT('Table'[Sector])
Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @V-lianl-msft ,
Im looking for similar kind of requirement above. Tha bar chart should display "0" even if we dont have blank values in fields instead of fields missing when filter. I am aware of "show items with no data". This is something which i can see categories on y-axis with not displaying "0". Im looking for categories should display "0" when we filter on other columns.
Expected Output:
Thanks in advance,
KK
That's a bad UX. Have your users asked for that?
Yes @lbendlin since i hide x-axis values and enable data labels users want to see '0' display for categories which have no data on bar chart.
Another request please, can we lock slicer drop down list on top screen instead of using scroll bars down the way to check category. It is occupying more space overlapping with other visuals.
Thanks in advance
KK
Hi Kavia,
There is a simpeler solution to your problem.
When you create a measure for the number of students, for instance:
NumberOfStudents = COUNT(SP_DASHBOARD[STUDENTNUMBER])
, the 0-values are not shown in the charts.
When you create the measure like this:
@AllardBon I would consider that to be a bug - as it means that BLANK() is treated as being equal to 0 which is incorrect.
Usually you can achieve that by using fields from the dimension table and selecting "show items with no data"
Please show a sanitized version of your data model.
User | Count |
---|---|
5 | |
5 | |
3 | |
2 | |
2 |
User | Count |
---|---|
9 | |
7 | |
4 | |
4 | |
4 |