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: 
dadumas
Creator II
Creator II

Set analysis not working across time

I have an application that measures open and resolved help ticket incidents (cases).

I have a MasterCalendar dimension with many fields, 2 of which are:  Date and MonthYear.  Ex, 01/17/2017 and Jan2017

I have an expression below, which calculates correctly when a MonthYear is selected, but does not work (greatly reduces the sum calculated), when not selected and data is summed across MonthYear in chart showing the measure across time.  All chart types show the same result, so think of a straight table here.

The columns [Entered Status Date] and %ResolvedDateNotNull, are dates, always populated, and are stored in the fact table.  [Case Count] is stored as a 1, and is also in the fact,  Facts are linked to the MasterCalendar through a MasterCalendarLink table, on a field named %MasterCalendarLink.  MasterCalendarLink has the %EntryDateFlag.  That linkage works fine, and I have used this date design in many applications in which there are multiple date "roles" across the same facts.  In this case, %EntryDateFlag is the "role" used for [Entered Status Date]

What this below does it to show open incidents (not resolved during the MonthYear in the chart) across time. 

sum({$<%EntryDateFlag={1}, [Entered Status Date]={"<=$(=max(Date))"}, %ResolvedDateNotNull={">$(=max(Date))"}>} [Case Count] )

Dave

21 Replies
swuehl
MVP
MVP

Attached a sample using a reference date link table and some flags.

Also another approach using a reference month data island (putting the creation of link table to the chart cube creation).

2017-01-25 22_54_55-QlikView x64 - [C__Users_Stefan_Downloads_sampleSetAnal2_Link.qvw].png

2017-01-25 22_55_11-QlikView x64 - [C__Users_Stefan_Downloads_sampleSetAnal2_Island.qvw].png

dadumas
Creator II
Creator II
Author

Thanks Stefan! - I will take a look...