If you’re new to Qlik Sense, start with this Discussion Board and get up-to-speed quickly.
I have an SQL Query and i am having difficulties with the Group By clause can anyone tell me how to handle it in click sense regards,
SELECT SUM (NUMBEROFCALLS) NUMBEROFCALLS,
SUM (NUMBER_OF_PRODUCTIVE_CALLS) NUMBER_OF_PRODUCTIVE_CALLS
FROM ( SELECT COUNT (PSS.STATUS_ID) NUMBEROFCALLS,
COUNT (DELIVERY.HEADER_ID) NUMBER_OF_PRODUCTIVE_CALLS,
FROM PRE_SALE_STATUS PSS,
FROM SALES S, SALES_DETAIL_VI SD
WHERE S.ID = SD.HEADER_ID AND SD.ORDER_QTY > 0
GROUP BY S.HEADER_ID) DELIVERY
WHERE PSS.STATUS_ID = SS.ID
AND PSS.OUTLET_CODE = O.CODE
AND PSS.DIST_CODE = D.CODE
AND PSS.ID = DELIVERY.HEADER_ID(+)
AND PSS.TRN_DATE BETWEEN :FDATE AND :TDATE
AND D.REGION_ID = NVL ( :P_REGION_LIST, D.REGION_ID)
AND D.TOWN_ID = NVL ( :P_TOWN_LIST, D.TOWN_ID)
AND D.CODE = NVL ( :P_DIST_CODE, D.CODE)
AND O.R_CODE = NVL ( :P_ROUTE_ID, O.R_CODE)
GROUP BY PSS.TRN_DATE, O.R_CODE, OUTLET_CODE)
You cans use
and your group by will be handled by SQL
If you want group by in Qlik you need to group it by all the available dimension else it will throw error.
On a lighter note It's Qlik Sense, You may want to correct it.
Thank You For your reply......I don't want to use SQL in Qlik at all just wanna implement the logic of this query in Qlik Scripting.How to do that??