Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
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.