Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I am loading a csv called "exportcsvde" in to Qlik sense, this file has a field called userAccountControl with a numeric value. I want to create several new fields based on previously created new fields. I added a list with the fieldnames i need to create and the formula.
userAccountControl | |
UAC_IND0 | if(userAccountControl>=67108864,1,0) |
UAC_VAL0 | if(UAC_IND0=1,[userAccountControl]-67108864,[userAccountControl]) |
UAC_IND1 | if(UAC_VAL0>=16777216,1,0) |
UAC_VAL1 | if(UAC_IND1=1,[UAC_VAL0]-16777216,[UAC_VAL0]) |
UAC_IND2 | if(UAC_VAL1>=8388608,1,0) |
UAC_VAL2 | if(UAC_IND2=1,[UAC_VAL1]-8388608,[UAC_VAL1]) |
UAC_IND3 | if(UAC_VAL2>=4194304,1,0) |
UAC_VAL3 | if(UAC_IND3=1,[UAC_VAL2]-4194304,[UAC_VAL2]) |
UAC_IND4 | if(UAC_VAL3>=2097152,1,0) |
UAC_VAL4 | if(UAC_IND4=1,[UAC_VAL3]-2097152,[UAC_VAL3]) |
UAC_IND5 | if(UAC_VAL4>=1048576,1,0) |
UAC_VAL5 | if(UAC_IND5=1,[UAC_VAL4]-1048576,[UAC_VAL4]) |
UAC_IND6 | if(UAC_VAL5>=524288,1,0) |
UAC_VAL6 | if(UAC_IND6=1,[UAC_VAL5]-524288,[UAC_VAL5]) |
UAC_IND7 | if(UAC_VAL6>=262144,1,0) |
UAC_VAL7 | if(UAC_IND7=1,[UAC_VAL6]-262144,[UAC_VAL6]) |
UAC_IND8 | if(UAC_VAL7>=131072,1,0) |
UAC_VAL8 | if(UAC_IND8=1,[UAC_VAL7]-131072,[UAC_VAL7]) |
UAC_IND9 | if(UAC_VAL8>=65536,1,0) |
UAC_VAL9 | if(UAC_IND9=1,[UAC_VAL8]-65536,[UAC_VAL8]) |
UAC_IND10 | if(UAC_VAL9>=8192,1,0) |
UAC_VAL10 | if(UAC_IND10=1,[UAC_VAL9]-8192,[UAC_VAL9]) |
UAC_IND11 | if(UAC_VAL10>=4096,1,0) |
UAC_VAL11 | if(UAC_IND11=1,[UAC_VAL10]-4096,[UAC_VAL10]) |
UAC_IND12 | if(UAC_VAL11>=2048,1,0) |
UAC_VAL12 | if(UAC_IND12=1,[UAC_VAL11]-2048,[UAC_VAL11]) |
UAC_IND13 | if(UAC_VAL12>=512,1,0) |
UAC_VAL13 | if(UAC_IND13=1,[UAC_VAL12]-512,[UAC_VAL12]) |
UAC_IND14 | if(UAC_VAL13>=256,1,0) |
UAC_VAL14 | if(UAC_IND14=1,[UAC_VAL13]-256,[UAC_VAL13]) |
UAC_IND15 | if(UAC_VAL14>=128,1,0) |
UAC_VAL15 | if(UAC_IND15=1,[UAC_VAL14]-128,[UAC_VAL14]) |
UAC_IND16 | if(UAC_VAL15>=64,1,0) |
UAC_VAL16 | if(UAC_IND16=1,[UAC_VAL15]-64,[UAC_VAL15]) |
UAC_IND17 | if(UAC_VAL16>=32,1,0) |
UAC_VAL17 | if(UAC_IND17=1,[UAC_VAL16]-32,[UAC_VAL16]) |
UAC_IND18 | if(UAC_VAL17>=16,1,0) |
UAC_VAL18 | if(UAC_IND18=1,[UAC_VAL17]-16,[UAC_VAL17]) |
UAC_IND19 | if(UAC_VAL18>=8,1,0) |
UAC_VAL19 | if(UAC_IND19=1,[UAC_VAL18]-8,[UAC_VAL18]) |
UAC_IND20 | if(UAC_VAL19>=2,1,0) |
UAC_VAL20 | if(UAC_IND20=1,[UAC_VAL19]-2,[UAC_VAL19]) |
UAC_IND21 | if(UAC_VAL20>=1,1,0) |
UAC_VAL21 | if(UAC_IND21=1,[UAC_VAL20]-1,[UAC_VAL20]) |
If i add these as a calculated field in the data-manager is see the script code later in the data load editor in the auto generated section. But i see the each created field after the one that refers to the field userAccountControl from the csv file doesnt refers to the previous created field but contains the formula from the previous fields:
Is there a way to refer to a created field? or what am i doing wrong? Because i think this isn't really efficient.
Probably you will need to do it directly within the script because the automatic "magic" is until now quite limited - in regard to the possibilities which you could use if you creates the script yourself. What do you looking for is called:
Preceding Load - Qlik Community - 1469534
- Marcus
Probably you will need to do it directly within the script because the automatic "magic" is until now quite limited - in regard to the possibilities which you could use if you creates the script yourself. What do you looking for is called:
Preceding Load - Qlik Community - 1469534
- Marcus