1

I'm wondering how to group some values in a filter panel in Qlik Sense

For Example: In a filter pane we have:

Item1
Item2
Item3
Item4

But Item3 and Item4 I want to group it just into a 1 ItemX2

So finally it will be:

Item1
Item2
ItemX2

How can I do this in Qlik Sense?

I was trying with match() or aggr() but I wasn't so lucky

Sebastián
  • 437
  • 5
  • 19

1 Answers1

1

This is a data issue. Try not to solve such problems in the frontend/UI. Especially in apps with a lot of data. Such solutions are going to reduce the performance (more aggregations on the fly)

In the script you can use ApplyMap function to create such grouping

(For example) In the script below the have Mapping table contains all Items that are requiring re-mapping (grouping in your case)

This table is used to create new field (ItemsGrouped) which will contain the new values (if the Items field is not a key to another table you can overwrite it with the ApplyMap instead of creating new field). This field can be shown in the UI and will contain these values:

Item1
Item2
ItemX2
ItemsMapping:
Mapping
Load * Inline [
Old  , New
Item3, ItemX2
Item4, ItemX2
];

Data:
Load
  ....
  Items,
  ApplyMap('ItemsMapping', Items) as ItemsGrouped
From
  MyData.qvd
;

Stefan Stoichev
  • 4,615
  • 3
  • 31
  • 51