Qlik Community

New to Qlik Sense

If you’re new to Qlik Sense, start with this Discussion Board and get up-to-speed quickly.

Announcements
QlikWorld 2022, LIVE in Denver CO., May 16-19, 2022. REGISTER NOW TO RECEIVE EARLY BIRD PRICING
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

set analysis. Unable to filter, keep getting sum of all record.

Hi Qlikers,

I have manage to get several set analysis expression to work correctly, but there's something weird about this weird expression, 

Sum(${<Inventory_Date={"$(=DATE(MAX(Inventory_Date), 'DD/MM/YYYY'))"},Shipment_Qty_Type={"Closed"}, dateSet={"$(=MonthName(addmonths(MAX(dateSet),-1)))"},QUANTITY_UM={"CTN"}>}total_qty)

The objective of this expression is to get the previous month's shipped_qty, but somehow, what I'm getting is always the sum of all of the records.

The below is the raw data. Actual Ship Date in the load script is loaded as,

"MonthName(Date("Actual Ship Date", 'DD-MM-YYYY')) as dateSet"

I have attach the app as well. please help ;(

1 Solution

Accepted Solutions
sunny_talwar

You have a misplaced $ sign:

Sum({$<Inventory_Date={"$(=DATE(MAX(Inventory_Date), 'DD/MM/YYYY'))"},Shipment_Qty_Type={"Closed"}, dateSet={"$(=MonthName(addmonths(MAX(dateSet),-1)))"},QUANTITY_UM={"CTN"}>}total_qty)

View solution in original post

4 Replies
Not applicable
Author

also, forgot to mention, that expression is used in the prev_average located at top-right of the app. thx.

sunny_talwar

You have a misplaced $ sign:

Sum({$<Inventory_Date={"$(=DATE(MAX(Inventory_Date), 'DD/MM/YYYY'))"},Shipment_Qty_Type={"Closed"}, dateSet={"$(=MonthName(addmonths(MAX(dateSet),-1)))"},QUANTITY_UM={"CTN"}>}total_qty)

View solution in original post

Not applicable
Author

haha. Thank you once again Sunny. I don't believe this, I have been scanning for SO MANY TIMES for misplaces and errors. really thanks Sunny.

sunny_talwar

Hahahaha I have been scratching my head for last 15-20 minutes to check what is going wrong . Not very used to using Qlik Sense so there was the challenge of finding where to find all the things

But I am glad we were ultimately able to resolve it