Reputation: 713
I'm frustrated that neither I could solve what seems to be a simple issue or find the solution online.
Say I have this dataset:
Then I go to the report page and set up a slicer with the "Name" and a matrix with the "Object" and "Price", as below:
So far so good.
Then, I know Jane doesn't have a car and a bicycle but I want to show all the itens, including these ones Jane doesn't have, at the matrix. So I click in "Show items with no data".
And then, for my surprise, nothing happens...the itens Jane doen't have are still not showing at the matrix...
What's the catch here and workaround?
Thank you!
Upvotes: 0
Views: 4650
Reputation: 1
There's an easy way around, create a measure/column and use it instead of the field.
Something like :
var a = Calculate(Sum(price))
return
If(Isblank(a), 0, a)
Or simplifying even more:
If(Isblank(Calculate(sum(price)),0,Calculate(sum(price))
Upvotes: 0
Reputation: 35915
You may want to take a look at this Microsoft article to better understand how "Show items with no data" actually works. Your data model is too simple and doesn't meet the criteria for the feature to make a difference.
The Show items with no data feature doesn't have any effect in the following circumstances:
- There's no measure added to the visual, and the grouping columns come from the same table.
- Groups are unrelated. Power BI doesn't run queries for visuals that have unrelated groups.
- The measure is unrelated to any of the groups. In this case, the measure will never be blank for only some group combinations.
- There's a user-defined measure filter that excludes blank measures. For example: SalesAmount >0
Your model doesn't have any measures, there are really no combinations with no data, all values are from the same table, and you are applying a filter that limits the data. Take a look at the examples in the article to see scenarios that get the feature to show.
Upvotes: 2