Skip to main content

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
QlikWorld 2023, a live, in-person thrill ride. Save $300 before February 6: REGISTER NOW!
cancel
Showing results for 
Search instead for 
Did you mean: 
alec1982
Specialist II
Specialist II

Set Analysis Expression

Hi Guys,

Anybody can tell me what's wrong with the below expression:

Sum({$<[Description] = {"*"} - {"Sold"}>}[Amount])

Thxs,

Alec

1 Solution

Accepted Solutions
mov
Employee
Employee

Jaime,

You think Alec is concerned about that error? 🙂

Alec, it is not an error.  Error is when you don't get the expected result...

View solution in original post

13 Replies
mov
Employee
Employee

Alec, try this:

Sum({$<[Description] =- {'Sold'}>}[Amount])

alec1982
Specialist II
Specialist II
Author

Thxs for the quick reply but this is giving me an error..

mov
Employee
Employee

I just changed a little, try again

alec1982
Specialist II
Specialist II
Author

Hi Michael,

Thanks for all your help. this still getting an error..

The reason i have double quotes "Sold" is beacuse the description is sometimes just Rent and sometime is Monthly Sold..

jaime_aguilar
Partner - Contributor III
Partner - Contributor III

Both Set analysis expressions are ok. What happens here is a syntax parser bug. It doesn't matter if you type the expression like this: Sum({$<[Description] = {"*"} - {"Sold"}>}[Amount])

or like this: Sum({$<[Description] =- {'Sold'}>}[Amount]) , both examples will cause that the syntax parser underlines part of the expression like if there was something wrong but it's not. In fact if you look at the upper left corner of the expression editor, you will see the label "Expression OK" telling you that everything is alright.

Btw, this is a known issue, however it has not been fixed yet

mov
Employee
Employee

The syntax is correct, I tested it.  Make sure that fiald names are not mistyped.

If you to exclude a value that contains 'Sold', not just equal 'Sold', you have to use * :

Sum({$<[Description] =- {'*Sold*'}>} [Amount])

mov
Employee
Employee

Jaime,

You think Alec is concerned about that error? 🙂

Alec, it is not an error.  Error is when you don't get the expected result...

alec1982
Specialist II
Specialist II
Author

Hi,

Thank you for the answer.. but not only the expression is giving me red line but it also doesn't give me the right answer..

Best,

Alec

mov
Employee
Employee

Can you upload an example?  The expression is rather simple, I can't guess what's wrong in this case.