Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Register by January 31 for $300 off your Qlik Connect pass: Register Now!
cancel
Showing results for 
Search instead for 
Did you mean: 
alwayslearning
Creator
Creator

Set Analysis for Current Quarter

Hi,

I am trying to create an expression which will sum a field just for the current quarter.

My quarters period are not default and need to change to the below:

Aug-Oct = Q1

Nov-Jan=Q2

Feb-Apr=Q3

May-Jul=Q4

I am trying to use Set Analysis:

=Sum({< DATE = {'>=$(=Date(vQuarterStart))<=$(=Date(vQuarterEnd))'} >} Revenue)

I need help with how I can set up the variables, vQuarterStart and vQuarterEnd to always be the current Quarter, first and last date?


e.g so if you looked at the field today it should show the sum between 01-Nov-17 - 31-Jan-18


Thanks.

1 Solution

Accepted Solutions
tresB
Champion III
Champion III

try using third parameter (first month of the year), like:


vQuarterStart=QuarterStart(today(),0,8)

vQuarterEnd=QuarterEnd(today(),0,8)

View solution in original post

5 Replies
tresB
Champion III
Champion III

try using third parameter (first month of the year), like:


vQuarterStart=QuarterStart(today(),0,8)

vQuarterEnd=QuarterEnd(today(),0,8)

sunny_talwar

Try this

=Sum({<DATE = {"$(='>=' & Date(QuarterStart(Today(), 0, 8)) & '<' & Date(QuarterStart(Today(), 1, 8)))"}>} Revenue)

antonaks
Creator II
Creator II

You can use this expression to define a quarter:

Ceil(Month(ID_DATE)/3)


alwayslearning
Creator
Creator
Author

Thanks.  Works perfectly.

alwayslearning
Creator
Creator
Author

Thanks Sunny