Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Replace the value in backend ?

Hi,

I have this code

load

    Code,

     Name,

     Place,

     Country

  from ABC.qvd;

now lets say the field Code has values starting from 100 to 300 .

i want to use the above ABC.qvd for the second time , but i want to replace the code with the value 105 with 705..how can i do it in the back end

thx

B

1 Solution

Accepted Solutions
Miguel_Angel_Baeyens

Hi Bairaj,

Just use a conditional to change that value.

load

    If(Code = 105, 705, Code) AS Code,

     Name,

     Place,

     Country

  from ABC.qvd;

Is that what you are after?

Miguel

View solution in original post

4 Replies
isaiah82
Creator III
Creator III

Ok, I'm assuming you want to load each Code as "Code + 700" - if not this will need to be tweaked:

load

    Code,

     Name,

     Place,

     Country

  from ABC.qvd;

CONCATENATE

 

load

    Code + 700 as Code,

     Name,

     Place,

     Country

  from ABC.qvd;

Miguel_Angel_Baeyens

Hi Bairaj,

Just use a conditional to change that value.

load

    If(Code = 105, 705, Code) AS Code,

     Name,

     Place,

     Country

  from ABC.qvd;

Is that what you are after?

Miguel

Anonymous
Not applicable
Author

Thank you Miguel, that is what i was looking for.

I have heard     " if", is not preferred from performance pt of view( When dealing with huge amount of data ) , so i was thinking , does QV  provide a function instead of using if condition. 

Miguel_Angel_Baeyens

Hi Bairaj,

Not in this case, where the If(), Match() or ApplyMap() should you need to change lots of values. It indeed will slow a bit your document but this is part of the development. The more tasks the script does, the faster your expressions will perform in your charts.

Hope that makes some sense.

Miguel