Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Using alias columns to create measures

Hi,

I did alias for the column names

like( POCKET_MARGIN as POCKET_MARGIN1)

and now i want to use to create a measure by using  pocket_margin1 like ( invoice_price1*pocket_margin1)

  i have stored the table in a qvd and loaded the data from qvd and from that columns i created the measure

but it is showing field not found error.

thanks in advance

1 Solution

Accepted Solutions
tamilarasu
Champion
Champion

Hi Srilatha,

Try this,

LOAD (INVOICE_PRICE2/SHIPPED_QUANTITY2) as price_contribution

FROM  'C:\pricing_profitability\Test.qvd' (qvd) ;


Or simply


LOAD (INVOICE_PRICE2/SHIPPED_QUANTITY2) as price_contribution

FROM  C:\pricing_profitability\Test.qvd (qvd) ;

View solution in original post

11 Replies
sunny_talwar

Can you share the exact script you are using?

Not applicable
Author

i can't share the whole script but

POCKET_MARGIN ,

STANDARD_MARGIN,

STANDARD_MARGIN ,

POCKET_MARGIN,

SHIPPED_QUANTITY,

SHIPPED_QUANTITY,

INVOICE_PRICE ,

INVOICE_PRICE ,

STANDARD_COST ,

STANDARD_COST,

POCKET_MARGIN as POCKET_MARGIN1,

STANDARD_MARGIN as STANDARD_MARGIN1,

STANDARD_MARGIN as STANDARD_MARGIN2,

POCKET_MARGIN as POCKET_MARGIN2,

SHIPPED_QUANTITY as SHIPPED_QUANTITY1,

SHIPPED_QUANTITY as SHIPPED_QUANTITY2,

INVOICE_PRICE as INVOICE_PRICE1,

INVOICE_PRICE as INVOICE_PRICE2,

STANDARD_COST as STANDARD_COST1,

STANDARD_COST as STANDARD_COST2;

        SQL SELECT *

FROM PRICING."PRICING_PROFITABILITY" ;

Margin_walk:

load

POCKET_MARGIN1,

STANDARD_MARGIN1,

  STANDARD_MARGIN2,

  POCKET_MARGIN2,

  SHIPPED_QUANTITY1,

  SHIPPED_QUANTITY2,

  INVOICE_PRICE1,

INVOICE_PRICE2,

  STANDARD_COST1,

  STANDARD_COST2

  RESIDENT PRICING_PROFITABILITY;

  STORE [Margin_walk] INTO 'C:\pricing_profitability\Test.qvd' (qvd);

 

 

  Contribution:

  load

  [(INVOICE_PRICE2/SHIPPED_QUANTITY2)] as price_contribution

  from 'C:\pricing_profitability\Test.qvd';

sunny_talwar

Why are you adding square brackets here?

Contribution:

  load

  [(INVOICE_PRICE2/SHIPPED_QUANTITY2)] as price_contribution

  from 'C:\pricing_profitability\Test.qvd';

Try this may be:

Contribution:

LOAD (INVOICE_PRICE2/SHIPPED_QUANTITY2) as price_contribution

FROM 'C:\pricing_profitability\Test.qvd';

Not applicable
Author

thanks for the reply

I removed the square brackets and i reloaded it,but it is giving the same issue

Anil_Babu_Samineni

Can you check whether these values are stored in qvd/not. If so, Check in list box then tell me.


INVOICE_PRICE2 & SHIPPED_QUANTITY2

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
sunny_talwar

What is the exact error you are seeing?

Not applicable
Author

NO, the columns are not stored in QVD

can  you please suggest me the correct way to do it

Not applicable
Author

qlikview_error.PNG

Chanty4u
MVP
MVP

Filed Names  and fieldValues are case sensitive.

Is checked or not?  in your actual data?