Forum Discussion
[BUG] Bar chart: show values with no data
Hi everyone,
I have the last release of Power BI Desktop. On a report I am working on I have a problem with bar charts.
On the x axes there are four countries, on the y axes there are some KPIs. Also if I select the option "show values with no data" on the x axes configuration, the chart shows only less countries when I filter something.
But if I create a new bar chart with the same configuration of the previous one the problem is solved. It seems to be a bug.
I ask to Microsoft to figure out what's the problem inside this situation.
Thank you,
Regards.
Hi rode,
As you said, this problem occurs to some older reports where you created chart before, and now, this problem has disappeared. I think it looks like an issue before, but it might has been fixed by product team now. If you still have any concern about this problem, you could report an issue or create a support ticket here.
Best regards,
Yuliana Gu
7 Replies
- v-yulgu-msftMicrosoft Employee
Hi rode,
What did you mean "the chart shows only less countries when I filter something"? What filter did you apply? In my test, I didn't encounter any problem with bar chart. Does this problem persist now when creating such a bar chart in your Power BI desktop?
By the way, have you ever created a support ticket? If you get any useful reponse about this problem, appreciate for your sharing.
Regards,
Yuliana Gu- rodeAdvocate II
Hi v-yulgu-msft and thank you for your answer.
When I say "the cart shows only less countries when I filter something" I mean a situation like the following:
- Consider to have 4 countries on X axes of the bar chart and the slicers do not filter anything
- Now let's use some slicer and, for example, filter out some customers: suppose that the chosen customers are not present in one country. So, only 3countries are shown instead of 4. Here comes the problem!
Even though I change the configuration of the bar chart and select "Show values with no data" on the contry (X axes), the bar chart keeps on showing 3 customers. The only way to solve this problem is to create from the scartch a new bar chart identical to the previous one.
By the way, I've never createda support ticket. Do you think is this one the case? As I said, it seems to be a bug.
Thanks a lot!
Regards.
- v-yulgu-msftMicrosoft Employee
Hi rode,
This is not a bug. By default, column headings are only displayed in your reports if they contain data. That is to say, in your table, there existing one row that contains Counrty4 and its corresponding custom is empty (blank value). In that case, to display empty categories, click on the down-arrow in the field you want to change in the Visualizations pane, and select Show items with no data. However, if there is no such an empty row data, it is not possible to show Country4 if filtering by customers not present in this country.
To work around your requirement, please refer to below steps.
Source data view.
Create a new calculated table.
Table1 = ADDCOLUMNS( CROSSJOIN(VALUES(Sheet1[Country]),VALUES(Sheet1[Custom])),"Amount",BLANK())
Based on table1, create another table.
Table2 = SUMMARIZE(UNION(Sheet1,Table1),Sheet1[Country],Sheet1[Custom],"Amount",LOOKUPVALUE(Sheet1[Amount],Sheet1[Country],[Country],Sheet1[Custom],[Custom]))
Add a chart visual and slicer, then, drag fields from table2.
Best regards,
Yuliana Gu