Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
aruneshgupta
Contributor III
Contributor III

Calculated field based first and second column

Hi All,

I'm seeking your help writing a logic in Qlik chart, not in script.

I require a calculated field named 'Calculated_Status,' where the logic dictates that if the 'Data Category' is 'All' and the Status is 'Approved,' then every row should display the status as 'Approved.' Otherwise, it should retain the original 'Status' values. Please find examples for both scenarios below.

 

Data category Status Calculated_Status 
All  Approved Approved
Sheet1 Open  Approved
Sheet2 Closed Approved
Sheet3 Approved Approved
Sheet4 Open  Approved
Sheet5 Open  Approved

 

or

Data category Status Calculated_Status 
All sheets Open  Open 
Sheet1 Open  Open 
Sheet2 Closed Closed
Sheet3 Approved Approved
Sheet4 Open  Open 
Sheet5 Open  Open 
     

 

Thanks in advance!

Best Regards,

Arunesh

Labels (5)
1 Solution

Accepted Solutions
rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

How about:

if(Max(TOTAL Match([Data category] & Status, 'AllApproved')), 'Approved', Status)

-Rob
http://www.easyqlik.com
http://masterssummit.com
http://qlikviewcookbook.com

View solution in original post

3 Replies
Anil_Babu_Samineni

@aruneshgupta 

Perhaps this

If([Data category]='All' and Status='Approved', 'Approved', Status)

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
rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

How about:

if(Max(TOTAL Match([Data category] & Status, 'AllApproved')), 'Approved', Status)

-Rob
http://www.easyqlik.com
http://masterssummit.com
http://qlikviewcookbook.com

aruneshgupta
Contributor III
Contributor III
Author

Wow, Rob! Thank you. This is exactly the solution I was looking for. I really appreciate your help!