Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Not applicable

Using Set Analysis

Hi,

in a document I have a pivot chart with Year and Month as dimensions and an Amount as an expression. In a list box I have joined year with month and with recordtype. I don't want to use recordtype with a dimension but I could have temporary and definitive records. When I select the recordtype I want to calculate the sum of the amount with the selected recordtype and for year and month measure.

I have tried to use this expression, unsuccessfully: sum({$<RecordType>} Amount), but I have the sum respect of year and month dimension but not for the selected RecordType.

Any suggests to me, please?

Thanks

11 Replies
brenner_martina
Valued Contributor II

AW:Using Set Analysis

Hi,

the right expression would be:

sum({$<RecordType={RecordType}>} Amount),

Not applicable

AW:Using Set Analysis

Thanks, but it doesn't function. I have tried to put a specific value for RecordType:

sum({$<RecordType={'Def'}>})

In this way, that I don't want, I have the right sum.

Not applicable

AW:Using Set Analysis

Hi,

the second solution is right, you just have to define a variable which will store "record type" and use it as a reference instead of "Def"

regard

christian

Not applicable

AW:Using Set Analysis

Ok. I have created the variable varRecordType; when I select the RecordType I set this variable.

I have written sum( ${ RecordType = { $(=varRecordType) } } Amount), but it doesn't function.

MVP
MVP

AW:Using Set Analysis

just try:

sum( ${ RecordType = {$(varRecordType) } } Amount) or sum( ${ RecordType = {"$(varRecordType)" } } Amount)


- Ralf

Not applicable

AW:Using Set Analysis

None of these solutions function and there is a syntax error (where are the < and > characters?).

Is there a sure documentation about set analysis?

MVP
MVP

AW:Using Set Analysis

Sorry:

<blockquote><pre>sum( {$ <RecordType = {$(varRecordType) }> } Amount) or sum( {$ <RecordType = {"$(varRecordType)" }> } Amount)


- Ralf
Not applicable

AW:Using Set Analysis

Don't worry. I have already tried also these solutions without success!

Thanks

Not applicable

AW:Using Set Analysis

Ok, I've solved with sum({$< RecordType = {$(varRecordType)} > } Amount).

The variable isn't set correctly.

Thanks