cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Frequent Visitor

Date filter breaks ALL

Given a simple table with a category, a date and a value column, e.g. :

  

category datevalue
a2018-01-0110
a2018-01-0220
a2018-01-0330
b2018-01-0440
b2018-01-0550

 

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.

6 REPLIES 6
Highlighted
Resident Rockstar
Resident Rockstar

Re: Date filter breaks ALL

Hi @nickdewitt,

 

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) ) 

 

Best Regards,

Cherry

Community Support Team _ Cherry Gao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Highlighted
Frequent Visitor

Re: Date filter breaks ALL

Hi @v-piga-msft,

 

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.

Highlighted
Resident Rockstar
Resident Rockstar

Re: Date filter breaks ALL

Hi @nickdewitt,

 

Sorry for misunderstanding before.

 

I have reported this issue internally CRI: 82109701. 

 

Will update here once I get any information. 

 

Best Regards,

Cherry

Community Support Team _ Cherry Gao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Highlighted
Frequent Visitor

Re: Date filter breaks ALL

Hi @v-piga-msft,

 

No problem, thank you for verifying and reporting 🙂

Highlighted
Resident Rockstar
Resident Rockstar

Re: Date filter breaks ALL

Hi @nickdewitt

 

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.

 

Best Regards,

Cherry

Community Support Team _ Cherry Gao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Highlighted
Frequent Visitor

Re: Date filter breaks ALL

Hi @v-piga-msft,

 

If this is the case, then why does it only happen on a date column and not on a text or number column? It doesn't seem to make sense..

 

Kind regards,

Nick

Helpful resources

Announcements
August 2020 Community Challenge: Can You Solve These?

August 2020 Community Challenge: Can You Solve These?

We're excited to announce our first cross-community 'Can You Solve These?' challenge!

Community Blog

Community Blog

Visit our Community Blog for articles, guides, and information created by fellow community members.

Upcoming Events

Upcoming Events

Wondering what events you could join or have an event to promote yourself? Check out our Upcoming Events.

Get Ready for Power BI Dev Camp

Get Ready for Power BI Dev Camp

We are thrilled to announce we will begin running a monthly webinar series named Power BI Dev Camp.

Top Solution Authors
Top Kudoed Authors