Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
curt1094
Partner - Contributor II
Partner - Contributor II

Creating a nest if statement with set analysis

Hi,

I'm trying to create a nest if statement that allows me to search a field called [KPI.KPI] for a value of 16 then counts records for [ERRORS.BUSINESS_PROCESS] where [ERRORS.BUSINESS_PROCESS] not "LABOR" and the field [ERRORS.TOT_TRANS_AMT] is not 0 and not null. I was thinking it should be written like this, but I have had no luck. 

If( KPI.KPI = 16,

      If( [ERRORS.BUSINESS_PROCESS] -= {"LABOR"} and [ERRORS.TOT_TRANS_AMT] -= {"0", null},

      Count([ERRORS.BUSINESS_PROCESS] )

          )

    )

Any help would be greatly appreciated. Thank you in advance.

 

Labels (1)
1 Solution

Accepted Solutions
BrunPierre
Partner - Master
Partner - Master

Try

Count({$<KPI.KPI = {16}, ERRORS.BUSINESS_PROCESS -= {"LABOR"},

ERRORS.TOT_TRANS_AMT={"*"}> * <ERRORS.TOT_TRANS_AMT={">0"}>} ERRORS.BUSINESS_PROCESS)

View solution in original post

2 Replies
BrunPierre
Partner - Master
Partner - Master

Try

Count({$<KPI.KPI = {16}, ERRORS.BUSINESS_PROCESS -= {"LABOR"},

ERRORS.TOT_TRANS_AMT={"*"}> * <ERRORS.TOT_TRANS_AMT={">0"}>} ERRORS.BUSINESS_PROCESS)

curt1094
Partner - Contributor II
Partner - Contributor II
Author

Thanks, this produced the result I was looking for.