Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anoop91
Contributor III
Contributor III

Need formula to calculate Max value of a specific data value

Im completely new to Qliksense and trying to create a formula to calculate the Max value of a particular field for a set of values

I want the KPI box to throw the Maximum of the Field "Days Open" only where Status (R-Y-G)='Critical' 

So the Value would be "92"

Days Open Case ID Status (R-Y-G)
14 ABC-1234 Critical
87 ABC-5678 RED 
32 ABC-9101 Green 
56 ABC-1121 Critical
92 ABC-1314 Critical
Labels (2)
2 Solutions

Accepted Solutions
Chanty4u
MVP
MVP

Hi Try this,

Test:
LOAD * INLINE [
DaysOpen, CaseID, Status(R-Y-G)
14, ABC-1234, Critical
87, ABC-5678, RED
32, ABC-9101, Green
56, ABC-1121, Critical
92, ABC-1314, Critical
];

exit SCRIPT;

expression: max({< [Status (R-Y-G)] = {'Critical'} >} [Days Open])

Chanty4u_0-1683133023971.png

 

View solution in original post

Anoop91
Contributor III
Contributor III
Author

@Chanty4u - Thank you So Much !!!! it worked !!!! thanks again , appreciate you replying so quickly !

View solution in original post

3 Replies
Chanty4u
MVP
MVP

Hi Try this,

Test:
LOAD * INLINE [
DaysOpen, CaseID, Status(R-Y-G)
14, ABC-1234, Critical
87, ABC-5678, RED
32, ABC-9101, Green
56, ABC-1121, Critical
92, ABC-1314, Critical
];

exit SCRIPT;

expression: max({< [Status (R-Y-G)] = {'Critical'} >} [Days Open])

Chanty4u_0-1683133023971.png

 

Anoop91
Contributor III
Contributor III
Author

@Chanty4u - Thank you So Much !!!! it worked !!!! thanks again , appreciate you replying so quickly !

Prem0212
Creator
Creator

You can use the Set Analysis expression Max({< [Status (R-Y-G)] = {'Critical'} >} [Days Open])

Please like and accept the solution if u liked it.