Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Error in expression with count aggregation and if statement

Hello hello,

I want to calculate the portfolio but I get an error in my expression.

COUNT (IF(MonthYear_Start<=Master_MonthYear AND
Relevant_Sales=1 AND
Contract_Status_Code -=0 AND
Contract_Status_Code -= 10 AND
(ISNULL(Month_End_Real)=-1 OR MonthYear_End_Real>=Master_MonthYear)), Contract_Key)

Error: "Error in expression: ')' expected"

I hope/think its a small mistake but I don't get it

Is it right that -= is in Qlik Sense the new <> (NOT EQUAL)?

2 Replies
MK_QSL
MVP
MVP

=COUNT(

  IF(MonthYear_Start<=Master_MonthYear AND Relevant_Sales=1 AND Contract_Status_Code <> 0 AND Contract_Status_Code <> 10 AND

  (ISNULL(Month_End_Real)<> 1 OR MonthYear_End_Real >= Master_MonthYear), Contract_Key))

Not applicable
Author

We modified our data model to a canonical date like here: Canonical Date

After that it was simple to calculate it.

Thank you anyway!!