Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
suniljain
Honored Contributor

Is it possible to give aliase name by evaluating expression ?.

is it possible to give aliase name by evaluating expression.

E.g

                   [FOR M]  as Date(AddMonths(Today(),0),'MMM-YYYY') ,

                   [FOR M+1]  as Date(AddMonths(Today(),1),'MMM-YYYY') ,

                   [FOR M+2]  as Date(AddMonths(Today(),2),'MMM-YYYY') ,

                   [FOR M+3]  as Date(AddMonths(Today(),3),'MMM-YYYY')

5 Replies

Is it possible to give aliase name by evaluating expression ?.

HI,

     Yes it is possible.

     Try this code.

     

let XYZ = date(AddMonths(Today(),0),'MMM-YYYY');

Inline:
LOAD * INLINE [
    Name
    a
    b
    c
    d
    e
    f
];

Data:
load Name as '$(XYZ)'
Resident Inline;

Regards,

Kaushik Solanki

suniljain
Honored Contributor

Is it possible to give aliase name by evaluating expression ?.

This logic donot work in my scenario

Is it possible to give aliase name by evaluating expression ?.

Hi,

    Whats your scenario..?

Regards,

Kaushik Solanki

MVP
MVP

Is it possible to give aliase name by evaluating expression ?.

The logic  of going via a variable should work fine. You just need to remove the single quotes from that example. Also, the resident load is not required as you could do the alias on the inline load.

To get three different field names you just need to set three different variables.

Remember to wrap the variables in square brackets if there is the possibility of spaces in the variable.

- Steve

suniljain
Honored Contributor

Is it possible to give aliase name by evaluating expression ?.

Thanks a Lot Steve.

Its Resolved.

Community Browser