Qlik Community

QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

cliff_clayman
Contributor

Straight table combining expressions

I have a straight table with one Dimension, Name and two expressions, # of Purchases and YTD Amount.  The result set relies on the expressions working together, meaning, I need to only see the total # of Purchases that are greater than 10 and where the YTD Amount is greater than 10,000.  How can I write the two expressions?

18 Replies
trdandamudi
Honored Contributor

Re: Straight table combining expressions

Give a try on the below:

Sum({<[# Of Purchases]={"$(=Count([# Of Purchases])>10"},[YTD Amount] = {'>10,000'}>} [# Of Purchases])

If this is not helping, can you please post a small sample.

cliff_clayman
Contributor

Re: Straight table combining expressions

That is only one expression.  Is the YTD Amount expression just a straight forward Sum?

mahesh3k
Contributor

Re: Straight table combining expressions

Post your sample data and your expression

trdandamudi
Honored Contributor

Re: Straight table combining expressions

The expression I gave you have the both conditions:

It will sum [# Of Purchases] only if count of [# Of Purchases] are greater than 10 and [YTD Amount] >10,000

Is that is what you are looking for ?

cliff_clayman
Contributor

Re: Straight table combining expressions

No, the table will have 3 columns.  Name, # of Purchases, YTD Amount.

I only want to see the # of Purchases that are greater than 10 and the YTD Amount is greater than 10,000.

So, I believe I will need two expressions.

trdandamudi
Honored Contributor

Re: Straight table combining expressions

Try as below:

Dimension: Name

Expression1:

Count({<[# Of Purchases]={"$(=Count([# Of Purchases])>10"},[YTD Amount] = {'>10,000'}>} [# Of Purchases])


Expression2:

Sum(YTD Amount)


Hope this helps...

cliff_clayman
Contributor

Re: Straight table combining expressions

[YTD Amount] is not a field that exists...it is an expression. 

karthikoffi27se
Contributor III

Re: Straight table combining expressions

Hi Cliff


First expression goes like this


Sum({<[# Of Purchases]={"$(=Count([# Of Purchases])>10"}>} [# Of Purchases])


And second one 


Sum({<[YTD Amount] = {'>10,000'}>}[YTD Amount])


Thanks

Karthik

trdandamudi
Honored Contributor

Re: Straight table combining expressions

Can you please share a small sample ....

Community Browser