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: 
Not applicable

Merging dimensions

Hi,

I trying to combine 2 dimensions into one using Edit Dimension:

=If(CSTM_LocalChannel2Hist = 'A1', 'A1',
If(CSTM_LocalChannel2Hist = 'A2', 'A2',
If(CSTM_LocalChannel2Hist = 'A3', 'A2'
If(CSTM_LocalChannel2Hist = 'A4', 'A2
If(CSTM_LocalChannel1Hist = 'A5', 'A5'
If(CSTM_LocalChannel1Hist = 'A6', 'A6'
If(CSTM_LocalChannel1Hist = 'A7','A7'

')))))))

I have an expression:

=If(CSTM_LocalChannel2Hist = 'A1',Sum({$<ACCT_Account0={'Net - Sales'}>}GNLD_AmountLCY),
If(CSTM_LocalChannel2Hist = 'A2',Sum({$<ACCT_Account0={'Net - Sales'}>}GNLD_AmountLCY),
If(CSTM_LocalChannel1Hist = 'A3',Sum({$<ACCT_Account0={'Net - Sales'}>}GNLD_AmountLCY),
If(CSTM_LocalChannel1Hist = 'A4'',Sum({$<ACCT_Account0={'Net - Sales'}>}GNLD_AmountLCY),
If(CSTM_LocalChannel1Hist = 'A5',Sum({$<ACCT_Account0={'Net - Sales'}>}GNLD_AmountLCY))))))

This only works when A2 has values and A3 and A4 does not.

I'm a bit stuck:-)

Thomas



4 Replies
robert_mika
Master III
Master III

In the expression part all the set analysis are the same.

Is the any reason for that?

Can you post your data,desired outcome or screenshot.

Feeling Qlikngry?

How To /Missing Manual(18 articles)

Not applicable
Author

I basically just need the 'Net - Sales' for the A1....A5 dimension values. There are many more in the dimension.

A3 and A4 need to be shown with A2 in one line as A2. So the sum of the 3.

robert_mika
Master III
Master III

Could you post your data?

Not applicable
Author

I have 2 dimensions:

CSTM_LocalChannel1Hist

CSTM_LocalChannel2Hist

I need some entries from one of them and some entries from the other, so I get chart/table with:

A1 and  GNLD_AmountLCY

A2 and  GNLD_AmountLCY

A3 and  GNLD_AmountLCY

A4 and  GNLD_AmountLCY

A5 and  GNLD_AmountLCY