Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
viveksairam89
Creator
Creator

Set analysis expression error

Hi,

I am unable to write this condition in the expression and calculated dimension, I have field1,2,3

Field1 and 2 are the dimensions

Field3 is the expression

Conditions and scenario:

if Tab in Field1 A is found  it should be displayed
For (Telephone, Mobile) in Field1 C is found it should be displayed.

If  field2=Tab in Field1 C is found then it should not display

Expression Used:
sum({<Field2=E({<Field1={'C'}, Field2={'Tab'}>} Field2)>}Field3)

LOAD * INLINE [
Field1, Field2, Field3
A, Telephone, 5
A, Tab, 5
B, Mobile, 10
C, Tab, 20
C, Telephone, 30
D, I Pod, 25

In Field1 A = Tab missing in the metrics

So can you kindly help me this to fix

1 Solution

Accepted Solutions
sunny_talwar

Try this:

Sum({<Key = E({<Field1={'C'}, Field2={'Tab'}>} Key)>}Field3)

Where Key is created like this in the script:

LOAD *,

  AutoNumber(Field1&Field2) as Key;

LOAD * INLINE [

    Field1, Field2, Field3

    A, Telephone, 5

    A, Tab, 5

    B, Mobile, 10

    C, Tab, 20

    C, Telephone, 30

    D, I Pod, 25

];


Capture.PNG

View solution in original post

3 Replies
sunny_talwar

Try this:

Sum({<Key = E({<Field1={'C'}, Field2={'Tab'}>} Key)>}Field3)

Where Key is created like this in the script:

LOAD *,

  AutoNumber(Field1&Field2) as Key;

LOAD * INLINE [

    Field1, Field2, Field3

    A, Telephone, 5

    A, Tab, 5

    B, Mobile, 10

    C, Tab, 20

    C, Telephone, 30

    D, I Pod, 25

];


Capture.PNG

stigchel
Partner - Master
Partner - Master

Or alternatively use

sum({1-<Field1={'C'},Field2={'Tab'}>} Field3)

viveksairam89
Creator
Creator
Author

Thanks Sunny and Piet Hein van der stigchel for you response

Regards

SM.Vivek