Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
jimbo_carlos
Contributor II
Contributor II

Aggr function question

Dear all,

I am wondering how to achieve the below desire result by using Aggr function? Thank you..

Data:

Model    Status                 Seq No      Criticality

A            WIP                         50                 High

A            Blocked                51                 Medium

B            No Resource       60                Medium

B            Blocked                 61               Medium

C            WIP                          65                High

 

(Show the result according to the minimum "Seq No"  +"Model" grouping . For the Status, Only "High Criticality" will display the Status.)

Desired Result:

Model    Status                 Seq No      Criticality

A            WIP                         50                 High

B                                             60                Medium

C            WIP                          65                High

 

2 Replies
Anil_Babu_Samineni
MVP
MVP

may be

Dimensions
**********
1) Model
2) Status
3) Criticality
Measure
*******
Min([Seq No])

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
JordyWegman
Partner - Master
Partner - Master

Hi Carlos,

Try this in the front-end. This will also work of you have multiple High's and multiple Seq No's.

For your measure:
IF(Criticality = 'High' OR [Seq No] = Aggr(Min([Seq No]),Model),1,null())

For your dimension:
IF(Criticality = 'High',Status,null())

Make sure you have the option: Add-ons --> Data handling  --> Include zero values, unchecked. 

2019-12-04 15_49_13-Window.png

I've added one more example to show that it works.

Jordy

Climber

Work smarter, not harder