Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
reddwarfcrew
Contributor II
Contributor II

Set Analysis Help

Hi, I have a table of data structured as follows:

CaseID
StatusStatusStartDateStatusEndDate
1Submitted01/01/201003/01/2010
1Reviewed03/01/201025/06/2010
1Valid25/06/201020/09/2018

I then have a variable populated on the sheet called 'mDate'.  mDate is a point in time and I'm I need to aggregate the days in status based on the point in time chosen.

So my set Analysis has

Sum($ <{mDate = ">=StatusStartDate"}, {mDate = "<StatusEndDate"}> (mDate - StatusStartDate))

Now this works fine, but I want to additionally add in a criteria to only sum if the Days in Status is >90. I assumed this would work but doesn't

Sum($ <{mDate = ">=StatusStartDate"}, {mDate = "<StatusEndDate"}, {(mDate - StatusStartDate) = ">90"} > (mDate - StatusStartDate))


Any ideas?


Thanks

3 Replies
mikecrengland
Creator III
Creator III

Hi Steven -

I'm not sure that it's doing what you think... The syntax looks all wrong. What are you trying to sum? A simple example is:

sum( {<Year={2008}>} Sales )

which is summing sales where the year = 2008.  Curly brackets around the set and the condition. Parenthesis around what you're trying to sum.

Set Analysis works once for the object, and not on a row by row basis. There's a .pdf out there named "QlikLearn-Set-Analysis-Presentation" that might help. It's attached to this link:

Re: I am Very new to Qlikview and planning to learn from scratch .

Mike

nsetty
Partner - Creator II
Partner - Creator II

Hi Steven,

Can you try below expression?

Sum($ <{mDate = {">= StatusStartDate < StatusStartDate"} > (mDate - StatusStartDate))

using wizard.

Set Analysis Wizard for QlikView | qlikblog.at

Thanks

logeshwariloki
Contributor
Contributor

Hi Steven,

Can you please try out the below expression?

=IF(Interval(StatusEndDate-StatusStartDate,'D') >90,Interval(StatusEndDate-StatusStartDate,'D'),'<90Days').

Hope this helps.