Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
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
Gysbert_Wassenaar

See attached qvw.


talk is cheap, supply exceeds demand

View solution in original post

3 Replies
maxgro
MVP
MVP

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;

Gysbert_Wassenaar

See attached qvw.


talk is cheap, supply exceeds demand
Not applicable
Author

it works perfectly.

Thank you.