Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Set Analysis Remove 1 Date From Range

I am trying to remove one date from a range I have in a line graph... The expression I'm trying to use is:

Sum({$<CurDay -={"5/30/2016"}>}[Causal Total Time])

I cannot get the chart to omit 5/30/2016.... Any Ideas?

24 Replies
sunny_talwar

Your date seems to be formatted as M/D/YYYY. Why don't you give this a try:

Sum({$<CurDay -= {"$(=Date(MakeDate(2016, 5, 30), 'M/D/YYYY')"}>} [Causal Total Time])

Not applicable
Author

When I use that expression, it results in the line graph showing this message:

"The selections generated no data for this chart"

sunny_talwar

My bad, I missed a parenthesis:

Sum({$<CurDay -= {"$(=Date(MakeDate(2016, 5, 30), 'M/D/YYYY'))"}>} [Causal Total Time])

Not applicable
Author

That expression gets rid of the error message, it says "OK" as in being a good formula, but doesn't give me the result I need.

About to just switch to Power BI!

sunny_talwar

What does it give you? Can you share the new screenshot?

spring101
Contributor III
Contributor III

If the expression continues to not work for a yet to be determined reason, how about just exclude the date from your dimension, =IF(Num(CurDay)=42520,Null(),CurDay).

Or try the same above set expression suggestions for a Num() instead of a date?

Not applicable
Author

OmitDate.jpg

Same result..

nizamsha
Specialist II
Specialist II

Check this one

Sum({$<Year={"$(=Max(Year))"},CreatedDate={">=$(=Date(Min(CreatedDate)))<=$(=Date(Max(CreatedDate)-1))"},Month=>}TotalTime)

Not applicable
Author

Nizam, thanks for the response.  That expression doesn't work unfortunately.

Sum([Causal Total Time]) is what I'm starting with, now I just need to omit the date (5/30/2016)

I've tried set analysis with no progress.

sasiparupudi1
Master III
Master III

Sum({$<CurDay -={"$(=Date(Date#('5/30/2016','MM/DD/YYYY'),'MM/DD/YYYY'))"}>}[Causal Total Time])

Please do not make hasty decissions..qlik rockz

hth

Sasi