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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Expression Help

Hi all,

I got this expression:
=SUM({1< Year = {$(=vStaticCY)}, Week = {$(=vStaticW)}, DivisionName = {'XXXX'}>} RevenueAmount)/1000

Now it shows me the max week of the max year. However is it possible to let me show the cumalative of week 1-6?

And that it keeps adding weeks untill the end of the year.

kind regards

1 Solution

Accepted Solutions
jagan
Partner - Champion III
Partner - Champion III

Hi,

Try this expression

=SUM({1< Year = {$(=vStaticCY)}, Week = {'<=6'}, DivisionName = {'XXXX'}>} RevenueAmount)/1000


or if you have variables for start and end week then use like this


=SUM({1< Year = {$(=vStaticCY)}, Week = {'>=$(=vStartWeek)<=$(=vEndWeek)'}, DivisionName = {'XXXX'}>} RevenueAmount)/1000


Hope this helps you.


Regards,

Jagan.

View solution in original post

3 Replies
Not applicable
Author

Just do in the set:

Week={>$(=vStartWeek) <$(vEndWeek)}

to get all the weeks between start and end

See a doc I have written on Set Analysis: http://community.qlik.com/docs/DOC-4951

Fabrice

sujeetsingh
Master III
Master III

Use AGR() function

jagan
Partner - Champion III
Partner - Champion III

Hi,

Try this expression

=SUM({1< Year = {$(=vStaticCY)}, Week = {'<=6'}, DivisionName = {'XXXX'}>} RevenueAmount)/1000


or if you have variables for start and end week then use like this


=SUM({1< Year = {$(=vStaticCY)}, Week = {'>=$(=vStartWeek)<=$(=vEndWeek)'}, DivisionName = {'XXXX'}>} RevenueAmount)/1000


Hope this helps you.


Regards,

Jagan.