1
votes

I have come over this extremely weird behaviour in PowerBI desktop.

I have a table with a simple measure like SUM(Table[Amount]) or COUNTROWS(Table) and add a number to the measure, like SUM(Table[Amount])+0.

If I try to filter this table through a relationship the Table visualisation in PowerBI will adhere to the filter but crossjoin all the columns of the remaining table items if the "Show items with no data" selection is on. If I deselect "Show items with no data" the filter will not be used and all items in the table is shown but this time without crossjoining the chosen columns.

If I remove the +0 in the measure everything behaves as expected. Any reasonable explantion to this behaviour?

Picture of the croissjoin. This is the same table with the same column choices as in the picture below. This is with "Show items with no data" selected.

Three column crossjoin

Here the filter is instead ignored and all table rows are showing. This is without "Show items with no data" selected.

enter image description here

1

1 Answers

2
votes

I believe this is a difference between returning a blank and returning a zero.

If you add +0 to the end of your measure, then in cases where there are no rows with data, it is returning BLANK()+0 = 0 instead of just BLANK().

If you don't have the +0, in cases where it returns a blank due to no corresponding rows, those rows don't show up in your table instead of having the full cross join.