# New to QlikView

If you’re new to QlikView, start with this Discussion Board and get up-to-speed quickly.

Announcements
Talk to Experts Tuesday, January 26th at 10AM EST: Qlik Sense. REGISTER NOW
cancel
Showing results for
Did you mean:
Not applicable

## Current Quarter Data

How can we calculate current quarter sales in qlikview?

1 Solution

Accepted Solutions
MVP

Try this

Assuming you date format is 'DD-MM-YYYY'

=Sum({<Date = {">=\$(=Date(Quarterstart(max(Date)),'DD-MM-YYYY'))<=\$(=date(max(Date),'DD-MM-YYYY'))"}>}Sales)

11 Replies
Champion III
Not applicable

It's not working.

I have a date field with date starting from Jan-2015 to Apr-2016, I need to pick last three month sales from this.

And also need to pick Last Quarter Sales?

Specialist III

Also

Try something like below

IF(DayNumberOfQuarter(Date_field)<=DayNumberOfQuarter(Today()),1,0) as QTD_Flag

From .... Table;

and use this flag in Set Analysis

Sum({<QTD_Flag={'1'}>}sales) --> will give you current quarter to date sales

Thanks

Sasi

MVP

Try to share a qvw with sample data and explain your requirement against that, so that we can work on right data and for right requirement without having to have much guess work.

Not applicable

Below is the sample data:

I want the output to be as Current Three Month Sales that is sum of Feb-16, Mar-16 and Apr-16

and Current quarter Sales that is Jan-16, Feb-16, Mar-16

 Date Sales Jan-15 75 Feb-15 77 Mar-15 59 Apr-15 70 May-15 91 Jun-15 51 Jul-15 99 Aug-15 58 Sep-15 82 Oct-15 94 Nov-15 82 Dec-15 66 Jan-16 66 Feb-16 56 Mar-16 68 Apr-16 81
Contributor II

Hi,

Refer this expression -

Regards,

Akshay

MVP

Try this

Assuming you date format is 'DD-MM-YYYY'

=Sum({<Date = {">=\$(=Date(Quarterstart(max(Date)),'DD-MM-YYYY'))<=\$(=date(max(Date),'DD-MM-YYYY'))"}>}Sales)

MVP

PFA

Specialist III

Try Below,

Date(date#(Date,'MMM-YY'), 'YYYYMM') as Month_year;

For Latest quarter

=sum({<Month_year={">=\$(=date(QuarterStart(max(Month_year),-1),'YYYYMM'))<=\$(=date( QuarterEnd(max(Month_year),-1),'YYYYMM'))"}>}Sales)

For last Three Months