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

Announcements
Only at Qlik Connect! Guest keynote Jesse Cole shares his secrets for daring to be different. Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Add a calculated column into Qlikview SQL select statement

Hello All

I am new to qlikview and in the learning phase.

I have connected to the OLE DB and was able to fetch the data using the sql query.

OLEDB CONNECT TO Server_Name

SQL SELECT SysContractID,

    "Target_Qty",

    TimePeriod,

    "Wholesaler Code"

FROM "discount_and_promotion".dbo."tbl_Contract_Details";

Store summary_tbl_contract_details into summary_tbl_contract_details.qvd (qvd);

What I want is a calculated column.

I want to sum up the "Target_Qty" grouped by SysContractID,"Wholesaler Code" & TimePeriod.

Can someone help me with the code.

2 Replies
maxgro
MVP
MVP

OLEDB CONNECT TO Server_Name

SQL SELECT

     SysContractID,

    sum(Target_Qty),

    TimePeriod,

    "Wholesaler Code"

FROM "discount_and_promotion".dbo."tbl_Contract_Details"

group by

     SysContractID,

    TimePeriod,

    "Wholesaler Code"

;

Not applicable
Author

Thanks for your input.

I got the answer outside the forum and did this in a different way.