Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Dear Qlik community,
I am new to Qlik and have a problem with a caption. Basically I want to to delete a zero in the column costobject of one specific data record. Therefore I made a scrpit which obviously does not work. I am pretty sure you know why in an instance. I thought Qlik would auto concatenate but after droping the source file and renaming the concatenated one the desired table is not there. Please let me know what I did wrong.
Thanks and kind regards
Bernhard
Temp1:
LOAD
*,
S_KoTraeger
where %S_KoTraeger_KEY <> '100-11';
Temp2:
LOAD
%S_KoTraeger_Key,
%S_KoTraeger_DELETED,
Replace(CostObject, '0','') as CostObject,
CostObjectArt,
CostObjectSelection,
CostObjectSuchbegriff,
CostObjectEndTermin,
CostObjectStartTermin,
CostObjectVerantwortlicher,
CostObjectDescription,
CostObjectDesc,
S_KoTraeger
where %S_KoTraeger_KEY = '100-11'
;
Drop Table S_KoTraeger;
Rename Table Temp1 to S_KoTraeger;
What is the source of these two tables? Same qvd? and why do you have LOAD * + a field name for your Temp1? What is the reason to do this
Temp1:
LOAD
*,
S_KoTraeger
where %S_KoTraeger_KEY <> '100-11';
What is your end goal here?
Are you trying to remove the lead in zeros from the CostObject field?
Are you trying to not load records that have a zero value in the CostObject field?
I am trying to erase the zero from the data record with the Key 100-11 only. Therefore I select this particular record and replace the zero with nothing and then I would like to concatenate the same table excluding this particular record to get all of my records and the particular one modified.
Is it more clear now?
So I believe you are trying to accomplish the removal of lead in zeros for this particular record.
I've loaded you table for all rows except the one in question:
LOAD
*
FROM
S_KoTraeger.qvd
(qvd)
Where
%S_KoTraeger_KEY <> '100-11'
;
Then I concatenate the row in question and transform the field in question:
Concatenate
LOAD
%S_KoTraeger_KEY,
%S_KoTraeger_DELETED,
Text(Num(CostObject)) as CostObject,
CostObjektArt,
CostObjectSelektion,
CostObjectSuchbegriff,
CostObjectEndTermin,
CostObjectStartTermin,
CostObjectVerantwortlicher,
CostObjectDescription
FROM
S_KoTraeger.qvd
(qvd)
Where
%S_KoTraeger_KEY = '100-11'
;
Good luck
Oscar
works thanks!
Bernhard,
If you've found the advice helpful or correct please close the post.
Qlik Community Tip: Marking Replies as Correct or Helpful
Thanks
Oscar