Qlik Community

QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

Not applicable

Field value in Set Analisys

Hi!

Help me please.

I have a list of Accounts and need to calculate expression, based on conditions. Conditions for each Account are different.

Example:

Table1:

AccountCondition
Account1'Dim1'
Account2'Dim2'
Account3'Dim1','Dim2'
Account4'Dim2',''Dim3'

Table2:

DimValue
Dim110
Dim220
Dim330

Condition is a set of Dims.

Accounts is Dimension in PivotTable.

I'm writing such Expression:

Sum({<Dim = {$(=Condition)}>}Value)

It doesn't work.

I tryed to use advice from this post Re: How to add Different Expressions for Different rows of a table ???

I'm making a variable Exp = "Dim1", "Dim2","Dim1,Dim2", "Dim2,Dim3", a field row = RowNo() and writing such expression:

Sum({<Dim = {$(=Pick(row, $(Exp)))}>}Value).

It works, only if I'm changing row to a specific value (1 or 2).

So field row is not divided on dimension.

If you have any ideas, help please.

Thank you!

1 Solution

Accepted Solutions

Re: Field value in Set Analisys

See attached qvw.


talk is cheap, supply exceeds demand
3 Replies
MVP
MVP

Re: Field value in Set Analisys

maybe in the load script

1.png

Table1:

load * inline [

Account, Condition

Account1, "Dim1"

Account2 ,"Dim2"

Account3 ,"Dim1,Dim2"

Account4 ,"Dim2,Dim3"

];

Table2:

load * inline [

Dim, Value

Dim1, 10

Dim2 ,20

Dim3, 30

];

link:

load Account, subfield(Condition, ',') as Dim Resident Table1;

Re: Field value in Set Analisys

See attached qvw.


talk is cheap, supply exceeds demand
Not applicable

Re: Field value in Set Analisys

it works perfectly.

Thank you.

Community Browser