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: 
Not applicable

Problem set analysis using QuarterStart

For an application I want to show data from the currently selected quarter and from previous quarters based on the selection. I've create a field StartQuarter within the master Calendar which hold the juliandate for the start of the Quarter. Now I use the set analysis displayed below.

Current month:

=SUM({$<StartQuarter = {$(=QuarterStart(StartQuarter,0)*1)}>}SumSales)

Previous Month:

=SUM({$<StartQuarter = {$(=QuarterStart(StartQuarter,-1)*1)}>}SumSales)

I know that for the first expression the set analysis is unnecessary but I did this for uniformity. The problem with the expression is that it won't display the value when I use -1 instead of 0 for the QuarterStart command. I checked the output from the QuarterStart outside the set analysis and it does return the correct JulianDate however it won't work in the set analysis. Any suggestions?

0 Replies