[Question/Discussion] Negation filters are not applied when no data matches

Resolved
Projet TCD asked on January 14, 2019

 

  • Version: Pivot Table for JSON data sources 2.6.11 (Jan 02, 2019)
  • Browser: Chrome 71.0.3578.98 on MacOS 10.14.1
  • Link to reproducehttp://jsfiddle.net/p03rn14y/
  • Steps to reproduce:
    • Display pivot table
    • See that only the row with "Group" of value "Group1" is displayed
    • See that Total Count of Country is 1
    • Click on the rows header "Group" to open the filter window
    • See that both "(blank)" and "(blank)" are unchecked (one is for empty values and the other for null values)
    • ---
    • Go to the data in the JS panel in JsFiddle and remove the following data (leaving only lines with Group null or empty):
      • ,
        [
        "Group1",
        "FR"
        ]
    • See that now the rows are unfiltered and 2 rows "(blank)" are displayed
    • See that Total Count of Country is 3

 

  • Slice configuration:
    • slice: {
      rows: [{
      uniqueName: "group",
      filter: {
      negation: true,
      members: [
      "group.[null]",
      "group.[]"
      ]
      }
      }],
      columns: [{
      uniqueName: "country"
      }, {
      uniqueName: "[Measures]"
      }],
      measures: [{
      uniqueName: "country",
      aggregation: "count"
      }]
      }
  • Observed behavior:
    • Negation filters do not apply when there are no result in the filtered set.
  • Expected behavior:
    • Negation filters should apply even when there are no result in the filtered set.
  • Notes:
    • Filters can't usually be applied in the GUI when they return no result (e.g. unchecking all the possible values)
    • However when reloading a report that make use of a negation filter and dynamic data, the filter is completely ignored and removed, which goes against that report configuration.
    • Resolving this behavior could allow reports with empty filters (no value selected) which could mislead users loading such report into thinking there are no data at all. This point needs discussion/proposal (e.g. displaying the number of lines filtered over the total number of lines?)

Attachments:
screen_01.png

2 answers

Public
Dmytro Zvazhii Dmytro Zvazhii Flexmonster January 15, 2019

Hello, 
Thank you for writing to us.
Currently, we are working on the major release which should include new updates for the filtering functionality. The case described by you is an interesting one. We are going to forward it to the dev team which works on the major release. 
We will keep you updated on this case.
Regards,
Dmytro

Public
Dmytro Zvazhii Dmytro Zvazhii Flexmonster April 1, 2019

Hello, 
We are glad to inform that the major 2.7 version has already been released and you are welcome to try it.
As for the negation case, we have run the investigation on our side. The existing architecture is not compatible with the suggested behavior. The negation filter is not applied when there are no members.
In such circumstances, we want to suggest a workaround. You can still achieve the desired behavior by applying additional setFilter() API call after the updateData() was performed. That should guarantee that the filtering is performed correctly.
Please let us know in case of any other question.
Regards,
Dmytro

Please login or Register to Submit Answer