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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Data summary

Need to summarize data for current, YTD and Inception to date via set analysis!

4 Replies
deepakk
Partner - Specialist III
Partner - Specialist III

hi,

You can do that in two ways.

1) create two variables intialize the first  variable with the minimum date.

   vMinDate = makedate(max(Year)) ------------------------  this will create 01-Jan-2012

   Second variable

    vMaxDate  = Max(TransactionDate)...... this will store the maxmium transaction Date and it will change as per user selection.

Use it in your expression  = Sum({<Date={">= $(vMinDate) <= $(vMaxDate)">}  Amount)

2) You can try the below method.

Sum({$<Year={$(=Max(Year))},MonthYear= {"<=$(=Max(MonthYear))"}>}   Amount)

Deepak

jagan
Partner - Champion III
Partner - Champion III

Hi,

Try this expression

Sum({<DateField={">=$(=YearStart(Max(DateField)))<=$(=Max(DateField))">}  Sales)

This will calculate the Max Year(Current Year)  Jan 1 to the max date.

Regards,

Jagan.

Not applicable
Author

Thanks Jagan. I am trying to sum the sales in the following formats: 1) Total sales since the beginning of 2012 (Jan & Feb)2) Total sales for 2011 (whole year)3) Total sales for 3-years starting with Jan 2012 going back Regards, Ray

Date: Mon, 20 Feb 2012 02:59:21 -0500

From: qliktech@sgaur.hosted.jivesoftware.com

To: ref2ntx@hotmail.com

Subject: - Re: Data summary

QlikCommunity

Re: Data summary

created by jagan mohan in Community Corner - View the full discussion

Hi, Try this expression Sum({<DateField={">=$(=YearStart(Max(DateField)))<=$(=Max(DateField))">} Sales) This will calculate the Max Year(Current Year) Jan 1 to the max date. Regards,Jagan.

Reply to this message by replying to this email -or- go to the message on QlikCommunity

Start a new discussion in Community Corner by email or at QlikCommunity

© 1993-2011 QlikTech International AB

Copyright & Trademarks | Privacy | Terms of Use | Software EULA

CELAMBARASAN
Partner - Champion
Partner - Champion

Hi,

     I think your expecting 3 expressions?

     For Current year: Sum({<Date={">=$(=YearStart(Max(Date)))<=$(=Max(Date))"},Month=,Year=>} Sales)

     For 2011: Sum({<Month=,Year={$(=Max(Year)-1)}>} Sales)

     For 3 years back from previous month:Sum({<Date={">=$(=MonthStart(Max(Date),-37))<=$(=MonthEnd(Max(Date),-1))"}>})

Hope it helps

Celambarasan