Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP 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
tresesco
MVP
MVP

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

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