Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

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
MVP
MVP

Re: Set Analysis Remove 1 Date From Range

Is CurDay a date field? You need to make sure that formatting on the RHS of the expression matches the one on the LHS. Also look here for date in set analysis

Dates in Set Analysis

Not applicable

Re: Set Analysis Remove 1 Date From Range

Yes, "CurDay" is my date field measure... I have a set of data going across a time period, it spiked on one day so I just want to omit it from my chart. What do you mean by "RHS" & "LHS"??

MVP
MVP

Re: Set Analysis Remove 1 Date From Range

Check below:


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


LHS format needs to be the same as RHS

May be try something like this:

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

Not applicable

Re: Set Analysis Remove 1 Date From Range

Didn't work.

spring101
New Contributor III

Re: Set Analysis Remove 1 Date From Range

Just out of curiosity are there any other expressions in this chart? Also, what is the data type of [Causal Total Time]? Finally, just for the heck of it, would you try the following:

Instead of:  -={"5/30/2016"}


perhaps try: ={'*'}-{"5/30/2016"}

Not applicable

Re: Set Analysis Remove 1 Date From Range

No other expressions, the causal total time is in minutes.. just tried this:

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

Didn't work.

MVP
MVP

Re: Set Analysis Remove 1 Date From Range

It doesn't really help knowing that it didn't work? May be provide what issue you ran into? Expression showed error, 0, null? Can you provide a sample to look at?

adi
New Contributor II

Re: Set Analysis Remove 1 Date From Range

Here you have 3 different ways to do what you are asking for. I hope you find this information helpful!

... see the attach QVW file...

Not applicable

Re: Set Analysis Remove 1 Date From Range

OmitDate.jpg

Your qvw. file will not open for me.... Here is an image of my line graph. There are 2 dimensions in this chart... Cur Day (MM-DD-YYYY) & Crew Name (A,B,C,).... The measure is Causal Total Time (Minutes)...

You see the spike for May 30? I just want that omitted from the chart. I've watched multiple videos on set analysis, tried everything I can.. Any expression ideas please post in reply to this. Below is what I am trying now, it gives me the "OK" but does not omit the date.

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