Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
nickdewitt
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.

7 REPLIES 7
maliarismendi
Regular Visitor

I have exact the same problem described above, any suggestions or links I can check to solve this?

v-piga-msft
Resident Rockstar
Resident Rockstar

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.

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.

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.

Hi @v-piga-msft,

 

No problem, thank you for verifying and reporting 🙂

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.

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.