Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
qlikviewaf
Creator
Creator

Formula on a field

Hi,

i would like to use this formula on my script, but i got an error saying "the field name should be unique".

How i can manage this in a afficient way?

Thanks

if(Match(trim(

),'ACT'),'Adjustment', Country_Desc) as Country_Desc

5 Replies
prma7799
Master III
Master III

Try this

if(Match(trim(

),'ACT'),'Adjustment', Country_Desc) as Country_Desc_New

qlikviewaf
Creator
Creator
Author

I would like to mantain the same Field Name since all my app has been build using Country_desc

prma7799
Master III
Master III

You don't allow same name in one table ...

Either you can rename your old filed or new field like this

1....

Load

Country_Desc as Country_Desc_Old,

if(Match(trim([Code]),'ACT'),'Adjustment', Country_Desc) as Country_Desc

...

From ....

or

2...

Load

Country_Desc ,

if(Match(trim(

),'ACT'),'Adjustment', Country_Desc) as Country_Desc_New

...

From ....

stabben23
Partner - Master
Partner - Master

Then you have to rename the Original Field, like Country_Desc as Country_Desc_Org. Or comment the Field away from script using //Country_Desc

Anil_Babu_Samineni

Perhaps this

Pick(Match(trim(

),'ACT')+1,'Adjustment', Country_Desc) as Country_Desc

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful