Given a simple table with a category, a date and a value column, e.g. :
I then write a measure to sum the value:
Sum of Value = SUM( test[value] )
And a measure to ignore the filtering of the dataset on the category:
Sum of All Categories = CALCULATE( [Sum of Value], ALL( test[category] ) )
If I now add just category to the report level filter, making changes to the selection has no effect on the value of "Sum of All Categories", but when I add the date column to the report level filters aswell, and set it to "Relative date filtering - is in the last 100 years", or just select some arbitrary dates, then all of a sudden changing the selection on the category filter begins to affect the value of the measure.
This only seems to be affecting dates, and if I use ALL( test ) to clear all filters, it also seems to work, but I only want to remove the filter on the category column not the date column.
Has anyone seen this behaviour before? This seems to work on other data types but as soon as you use a date it seems to break.
Actually, this should be caused by the All function.
If you modify your measure like below, it will clear the filter for date.
Sum of All Categories = CALCULATE( [Sum of Value], ALL( test[date] ) )
If you modify your measure like this, it will clear all the filter for the table.
Sum of All Categories = CALCULATE( [Sum of Value], ALL( test) )
I don't want to clear the filter from the date column, I want that one to be kept, and yes I can clear all filters on the table but again this is not what I want, I want to just clear the filter from the category column and keep any filters from the date column.
I don't get this problem if i try to use something other than a date field, and no problem if i clear the filters from the whole table.
Sorry for misunderstanding before.
I have reported this issue internally CRI: 82109701.
Will update here once I get any information.
By confirmed by PG, this is the designed behavior of Power BI.
Multiple single column filters from a single table are combined into a single filter of multiple columns. So when ALL function removes filter on a particular column, the combined filter is projected to the remaining columns. Since the combined filter preserves the correlation between the columns in the underlying table, the projection will reserve the effect of the removed column. In this example, if user sets filters on both [category] and [date] columns, the combined filter of two columns only contain combinations of rows exist in the underlying table. Since each category value corresponds to a distinct set of the date values, the combined filter only contain dates corresponding to the selected category value, as a result, even though ALL function removes the category filter, the surviving date values still only correspond to the previously selected category value.
Marco Russo who will write a blogpost on this topic in sqlbi.com soon.
It’s time for another PBI Community recap!
Visit our Community Blog for articles, guides, and information created by fellow community members.
Need help with the Power BI Community? Our 'Using the Community' support articles are a great place to start.
Looking for inspiration on how to present your data? Need instructional videos? Check out our Galleries!