Forum Discussion

nickdewitt's avatar
nickdewitt
Frequent Visitor
8 years ago

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

  • v-piga-msft's avatar
    v-piga-msft
    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

    • nickdewitt's avatar
      nickdewitt
      Frequent Visitor

      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.

      • v-piga-msft's avatar
        v-piga-msft
        Resident Rockstar

        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

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