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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
dseelam
Creator II
Creator II

SetAnalysis

Hello All,

Some one explain me below logic in simple terms?

sum({$<CancelDateNum_OO={">=$(vCurrentMonthStartDateNum) <=$(vMaxShipDateNum)"}=>} Quantity_OO *UNIT_SELLING_PRICE_OO)

Thanks,

Dinesh

12 Replies
dseelam
Creator II
Creator II
Author

Hey Karthik,

I will try provided expression!

my exact requirement

sum({$<CancelDateNum_OO={">=$(vCurrentMonthStartDateNum) <=$(vMaxShipDateNum)"}=>} Quantity_OO *UNIT_SELLING_PRICE_OO)


--this issue exists only on 1st of every month


Above expression should give me amount that got past cancelled from current month, September 1st it gave me eg:100000 $ but it is supposed to be 0$ since it is the first day of the month so there should be no orders with September cancel date that are past cancelled yet


CancelDateNum_OO= dates varies from 2014 to 2018

vCurrentMonthStartDateNum = num(MonthStart(vMaxShipDate))

vMaxShipDate=max(ship date) ship date is mostly yesterday in most cases except Sunday - what happens in if month end is Sunday

vMaxShipDateNum= num(vMaxShipDate)

Thanks,

D

dseelam
Creator II
Creator II
Author

Hello Kushal,

expression in both cases

vCurrentMonthStartDateNum = num(MonthStart(vMaxShipDate))

vMaxShipDate=max(ship date) ship date is mostly yesterday in most cases except Sunday - what happens in if month end is Sunday

vMaxShipDateNum= num(vMaxShipDate)

qliksus
Specialist II
Specialist II

How does the Monthstart('31/08/2017') will give you '01/09/2017' ?  are you using correct date format  the issue in your case is your start date > end date hence the result is showing all the data less than the end date . Are you trying with proper date format