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

Field name Change

I would like to change contentsname from BP_Partner_Master.Customer_Group_Now_ID_DE, but it dosen't functioned.

have someone idea?

LOAD

BP_Partner_Master.BP_ID as %BP_ID_PM,



If(BP_Partner_Master.Customer_Group_Now_ID_DE = 'Corporate', 'KAM') or

if(BP_Partner_Master.Customer_Group_Now_ID_DE = 'Intercompany', 'Nursery') or

if(BP_Partner_Master.Customer_Group_Now_ID_DE = 'Global','Territory')or

if(BP_Partner_Master.Customer_Group_Now_ID_DE = 'Key','Key')or

if(BP_Partner_Master.Customer_Group_Now_ID_DE = 'Nursery','Nursery')or

if(BP_Partner_Master.Customer_Group_Now_ID_DE = 'Standart','Standart')or

if(BP_Partner_Master.Customer_Group_Now_ID_DE = 'Privat','Privat' ), 'xxx'

as BP_Account_Group

Thanks

FROM C:\QlikView\Private\QVD\Customer\BP_Partner_Master.qvd (qvd);

9 Replies
Not applicable
Author

It looks to me as though you should remove the % sign from the field, I haven't tried this but I'm sure it wouldn't work like that, just use AS BP_ID_PM.

Regards,

Nigel.

Oleg_Troyansky
Partner Ambassador/MVP
Partner Ambassador/MVP

I see 2 problems in your statement:

1. If you definitely want to use "%" in your FIeld Name, you need to enclose your field name in square brackets "[" and "]":

BP_Partner_Master.BP_ID as [%BP_ID_PM],

2. Your nested IF statement has a wrong syntax. You can't use "or" like this.

This syntax is wrong:

if (a = b, Value1) or if(a=c, Value2)

The correct syntax to achieve the same logic is:

if (a=b, Value1, if (a=c, value2) )

In your case, however, I'd recommend replacing a 7-levels deep nested IF with a simple mapping table and applymap function.

cheers,

Oleg



Not applicable
Author

Hi Oleg,

Thanks for your Help.

what i want see attached Qlikview.

how can i do with mapping table and applymap function.

Thanks.

Shideh

Not applicable
Author

Try:

LOAD

BP_Partner_Master.BP_ID as %BP_ID_PM,

If(BP_Partner_Master.Customer_Group_Now_ID_DE = 'Corporate', 'KAM',

if(BP_Partner_Master.Customer_Group_Now_ID_DE = 'Intercompany', 'Nursery',

if(BP_Partner_Master.Customer_Group_Now_ID_DE = 'Global','Territory',

if(BP_Partner_Master.Customer_Group_Now_ID_DE = 'Key','Key',

if(BP_Partner_Master.Customer_Group_Now_ID_DE = 'Nursery','Nursery',

if(BP_Partner_Master.Customer_Group_Now_ID_DE = 'Standart','Standart',

if(BP_Partner_Master.Customer_Group_Now_ID_DE = 'Privat','Privat' , 'xxx')))))))

as BP_Account_Group



Not applicable
Author

Hi,

Thanks

it dosen't changed see new qlickview

Shideh

Not applicable
Author

Hi Shideh,

you must change the list control to use field BP_Account_Group instead of Customer_group_now_ID_DE

Regards,

Joao

Not applicable
Author

Hi Joao,

thanks

my field name in QVD is Customer_group_now_ID_DE. wenn ich change the list control to use field BP_Account_Group , the scrip run with error.

With the

BP_Partner_Master.Customer_Group_Now_ID_DE as BP_Account_Group , I would like the name from table changed. It's work.

But I would like the name from field in the table changed too and they aren't changed.

See attached QlikView.



Not applicable
Author

You have the title Account Group in the left List Box, but the field is still "Customer Group Now ID DE". You must edit the properties and select the field from the Combobox.

See attached.

Not applicable
Author

Hi,

Thank's. it is Correct, what you write. thanks again.

Shideh