Qlik Community

QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

Not applicable

How to use set Analysis to solve expression which associate with dimention?

Variables:error loading image

vContractDate =min(ContractDate)

Qustion just like above pic, I want to calc each CustID's asset that DoneDate >=ContractDate

That means the condition associate with dimention

How to solve this ?

Tags (1)
6 Replies
MVP
MVP

How to use set Analysis to solve expression which associate with dimention?

Hi

You can't use a set expression in this case, because set expressions are evaluated on the entire data set, outside the context of the chart and know nothing of the dimensions in the chart. The alternative is sumif.

Something like:

Sum(If(DoneDate>=ContractDate, Asset))

Jonathan

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
Not applicable

How to use set Analysis to solve expression which associate with dimention?

Thanks your reply

IF using sumif, it would be related with client selections ,for example I choose doneDate:20100108, the result will be all zero.

It also a big problem.

Any other solution?

MVP
MVP

How to use set Analysis to solve expression which associate with dimention?

Hi

If you want to override user selections, you can combine a set expression with the sumif. The user selection override does not need the chart context, so you can use a set expression for this purpose.

To override the selection of DoneDate use a blank set expression target like:

Sum({<DoneDate=>} If(DoneDate>=ContractDate, Asset))

Override DoneDate and CustID selections:

Sum({<DoneDate=, CustID=>} If(DoneDate>=ContractDate, Asset))

Override all user selections (careful with this one):

Sum({1} If(DoneDate>=ContractDate, Asset))

Jonathan

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
Not applicable

How to use set Analysis to solve expression which associate with dimention?

Good done!,Thanks

Not applicable

How to use set Analysis to solve expression which associate with dimention?

Good done, Thanks

Not applicable

How to use set Analysis to solve expression which associate with dimention?

Actually you can resolve a set expression at the dimension level with the use of variables and conditional testing.

I recently created a Wiki on the subject which you might find of interest.

Regards,

Gordon

Community Browser