Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
hobanwashburne
Creator
Creator

Aggregation syntax help

I have a text box in which I want to display sales for a particular month, the following line works:

=num(Sum ({$<FiscalPeriod={201303}>}NetSales),'$#,##0')

Now I want to replace the static text “201303” with either a variable (vGLPR) or the
calculation to get back to the correct month (
date(AddMonths(Today(),-4),'YYYYMM')

Let vGLPR = date(AddMonths(Today(),-4),'YYYYMM');

1 Solution

Accepted Solutions
jerem1234
Specialist II
Specialist II

Try this:

=num(Sum ({$<FiscalPeriod={$(=date(AddMonths(Today(),-4),'YYYYMM'))}>}NetSales),'$#,##0')

View solution in original post

3 Replies
jerem1234
Specialist II
Specialist II

Try this:

=num(Sum ({$<FiscalPeriod={$(=date(AddMonths(Today(),-4),'YYYYMM'))}>}NetSales),'$#,##0')

hobanwashburne
Creator
Creator
Author

Thank you, does anyone know what the variable method would look like?

jerem1234
Specialist II
Specialist II

This should be it:

=num(Sum ({$<FiscalPeriod={'$(vGLPR)'}>}NetSales),'$#,##0')

and let defintion of vGLPR be: =date(AddMonths(Today(),-4),'YYYYMM')