Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
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
Luminary Alumni
Luminary Alumni

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
Luminary Alumni
Luminary Alumni

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.