Skip to main content
Announcements
Announcing Qlik Talend® Cloud and Qlik Answers™ to accelerate AI adoption! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
marcus_steggall
Creator
Creator

How to use Alias fields, in subsequent scripting loads?

Afternoon all, hopefully someone can help me with this question as I'm quite new to Qlikview Developing. I've only taken out a bit of the script to show as an example here. So basically you can see an if statement called Category from my qvd.

Then after this has loaded, i want to do some subsequent calculations on this, to make them individual fields.

QUALIFY *;
UNQUALIFY

Timekeeper_Number,Period_Number;

Timelines:
LOAD

Worked_Hours,
Activity_Code,
Activity_Desc,
Timekeeper_Number,
Timekeeper_Name,
Matter_Practice_Code,
Matter_Service_Code,
Matter_Number,
Matter_Name,
Client_Number,
Client_Name,
Period_Number,

If(Wildmatch(Matter_Number,'*44*'),'Client FF',
If(Matter_Practice_Code = '999','Other','Client T&M')) as 'Category'


FROM


(
qvd);


calcs:
LOAD
(
if('Category'='Client T&M',Worked_Hours,0)) as 'Client T&M'

FROM

(
qvd);

Is this possible, or completely wrong way of going about it?!? Thanks

1 Solution

Accepted Solutions
sunny_talwar

This as done won't be possible, but you can do this using the preceding load or resident load

Timelines:

LOAD *,

          (if('Category'='Client T&M',Worked_Hours,0)) as 'Client T&M';

LOAD

Worked_Hours,
Activity_Code,
Activity_Desc,
Timekeeper_Number,
Timekeeper_Name,
Matter_Practice_Code,
Matter_Service_Code,
Matter_Number,
Matter_Name,
Client_Number,
Client_Name,
Period_Number,

If(Wildmatch(Matter_Number,'*44*'),'Client FF',
If(Matter_Practice_Code = '999','Other','Client T&M')) as 'Category'


FROM


(
qvd);


HTH


Best,

Sunny

View solution in original post

2 Replies
sunny_talwar

This as done won't be possible, but you can do this using the preceding load or resident load

Timelines:

LOAD *,

          (if('Category'='Client T&M',Worked_Hours,0)) as 'Client T&M';

LOAD

Worked_Hours,
Activity_Code,
Activity_Desc,
Timekeeper_Number,
Timekeeper_Name,
Matter_Practice_Code,
Matter_Service_Code,
Matter_Number,
Matter_Name,
Client_Number,
Client_Name,
Period_Number,

If(Wildmatch(Matter_Number,'*44*'),'Client FF',
If(Matter_Practice_Code = '999','Other','Client T&M')) as 'Category'


FROM


(
qvd);


HTH


Best,

Sunny

marcus_steggall
Creator
Creator
Author

ahh sunny, it worked like a dream... really appreciate your response

Used to SQL sequences, would never have thought putting this above the actual IF statement.

Cheers pal