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

MAXIFS in Qlik sense

Hi,

How can i achieve the equivalent of Maxifs in Qlik Sense? Like in the example below, if a PO has lines  in categories 0 and 1 then the overall PO category should be 1, if all lines are in category 0 then PO category is 0 and if all lines are in category 1 then PO category is 1.

Mwang_1-1636373068096.png

 

 

1 Solution

Accepted Solutions
Or
MVP
MVP

Load * From YourTable;

JOIN

Load [PO Number], max(Line Category) as [PO Category]

From YourTable

Group By [PO Number];

You could re-use the original table (Resident load instead of loading from file again) to make it quicker if the data volume is large.

If you need to do this at an object level, and your dimension is PO Number, you could aggr(), for example:

Aggr(Max([Line Category]),[PO Number])

View solution in original post

2 Replies
Or
MVP
MVP

Load * From YourTable;

JOIN

Load [PO Number], max(Line Category) as [PO Category]

From YourTable

Group By [PO Number];

You could re-use the original table (Resident load instead of loading from file again) to make it quicker if the data volume is large.

If you need to do this at an object level, and your dimension is PO Number, you could aggr(), for example:

Aggr(Max([Line Category]),[PO Number])

Mwang
Contributor
Contributor
Author

Thank you so much @Or , the join worked so well.