Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Qlik1232_
Contributor
Contributor

Dimension in a Set Expression

Hi Team,

I am working on a set expression to get data which is having some conditions. 

I have a dimension called DIM1 and it is an if condition, which is working fine. and also I have another dimension called DIM2 having reference of DIM1, which is also an if condition. Is it possible to refer DIM1 dimension in DIM2 set expression. 

I have attached the current expression below and DIM2 is not working since i have reference DIM1

DIM1 :

=IF ([Country] = 'GGM - India', [DEST4_GERARCHIA_340.DESC_DEST4_ELEGER_5],
IF ([Country] = 'GGM - Brazil', [DEST4_GERARCHIA_350.DESC_DEST4_ELEGER_5],
IF ([Country] = 'GGM Headquarters','HQ', [DEST4_GERARCHIA_380.DESC_DEST4_ELEGER_5])))

DIM2 : 

=IF ([DIM1] = [DEST4_GERARCHIA_340.DESC_DEST4_ELEGER_4], [DEST4_GERARCHIA_340.DESC_DEST4_ELEGER_3],
IF ([DIM1] = [DEST4_GERARCHIA_350.DESC_DEST4_ELEGER_4], [DEST4_GERARCHIA_350.DESC_DEST4_ELEGER_3],
IF ([DIM1] = [DEST4_GERARCHIA_380.DESC_DEST4_ELEGER_4], [DEST4_GERARCHIA_380.DESC_DEST4_ELEGER_3],
'HQ')))

Can anyone share the correct syntax?

Thanks 

Aswathy 

 

Labels (5)
1 Reply
Rockstar7
Partner - Creator
Partner - Creator

@Qlik1232_  you can write the DIM1 expression in the data load editor and you can use the derived field in your DIM2 calculation.