Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Announcements
Leverage your QlikView investment to modernize BI – see how! Join Group
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
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
Highlighted
Master III
Master III

Re: Formula on a field

Try this

if(Match(trim(

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

Highlighted
Creator
Creator

Re: Formula on a field

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

Highlighted
Master III
Master III

Re: Formula on a field

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 ....

Highlighted
Master
Master

Re: Formula on a field

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

Highlighted

Re: Formula on a field

Perhaps this

Pick(Match(trim(

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

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)