Advanced Search Filter Trap


NPrinting filters offer a versatile range of options, from basic string and numerical value filters to the dynamic “evaluate value” feature, and finally, the highly sophisticated “advanced search” filter option. While advanced search filters are incredibly powerful and robust, there is a critical detail that users must understand to avoid unintended results. Let’s delve into this with simple example and few key considerations.

Advanced search filters operate within the current selection state of the data. This means the outcome of a filter is influenced by any pre-existing selections applied in the application. Lets have a look at the example. I have an app here which has data for 3 years and 3 stores. When inspecting this data we can see that sales for store A was only in 2024 and sales for stores B and C was in 2022 and 2023.

Scenario 1: No other filters applied.

In this scenario we apply advanced search filter while there are no other filters applied. This means that we apply it on full dataset and it returns as expected 2024l as that is indeed max available financial year.

=[Financial Year]=Max(Total [Financial Year])

Senario 2: Store filter B & C applied.

In this scenario we first apply selection on [Store] dimension by selecting values B & C and we then apply exactly the same [Financial Year] filter. The result is different than previously and the value returned is 2023 as that is the actual max value for the selection state when stores B & C are selected.

Senario 3: Override current selection state.

Advanced search allows us to override current selection state by using identifier for full dataser {1}. The search formula can look like below example:

=Only({1}[Financial Year])=Max(Total {1}[Financial Year])

As you can see applied advanced search filter overrides current selection state and when applied it removes [Store] selection!

Summary: Harnessing Advanced Filters Effectively

When applying NPrinting filters and using “Advanced search” option we create a filter which depending on particular scenario can behave in the same way the one of the above examples behaves. We also need to consider that NPrinitng filter can be applied as:

  • Task filter
  • Raport filter
  • User filter
  • Object filter

Advanced filters are a powerful tool in NPrinting, enabling dynamic data selection, however, their behavior depends on the current selection state, which can be affected by multiple layers of filters. To use them effectively:

Advanced search filters are my go-to option when I have to work with highly dynamic data. They allow me to greatly enhance the sofitication and efficiency of NPrinting reports.

cheers

Leave a comment