Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Creating dimensions

Hi all,

I have a set of codes for different countries which I'd like to divide into groups in order to create a dimension called 'Office'. The field of these codes is called 'MarketCd'.

If the code is 16 or 76, the group should be called 'UK+IR'. If the code is 92 or 93 the group should be called 'Overseas'. For all of the other codes, I want the dimension to create unique value sets which are named with the 'MktDescrip' that corresponds to that 'MarketCd'

The table below may help you understand what I mean:

   

MktDescripMarketCdOffice
UK16UK+IR
Belgium 15Belgium
Portugal10Portugal
France12France
USA46USA
Spain11Spain
Ireland76UK+IR
Asia92Overseas
Oceania93Overseas

Do you have any ideia how should I do This?

Thank you!

2 Replies
Thiago_Justen_

Maybe this will br helpful:

If(MarketCd=16 or MarketCd=76, 'UK+IR',

     If(MarketCd=92 or MarketCd=93, 'Overseas', MktDescrip))

Thiago Justen Teixeira Gonçalves
Farol BI
WhatsApp: 24 98152-1675
Skype: justen.thiago
tamilarasu
Champion
Champion

Hi Sofia,

You can also try,

  • If(Match(MarketCd, 16,76), 'UK+IR',

                If(Match(MarketCd, 92,93), 'Overseas', MktDescrip))

  • Pick(Match(MarketCd,16,76,92,93)+1,MktDescrip,'UK+IR','UK+IR','Overseas','Overseas')

I would suggest you to create this field in script level. Have a nice day.