Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Dayna
Creator II
Creator II

Set Analysis Syntax Problem - Previous Quarter

Hello All!

I'm trying to get the previous quarter, and I think my syntax is slightly out... Here's what I have:

=sum({$<Applicator_Date={"$(=date(addmonths((Applicator_Date),-3)))"}>}Applicator_Cost)

Applicator_Date is a date field. Any ideas? 

If I do this in a text box and change it to:

=date(addmonths(max(Applicator_Date),-3)) then I get the result I'd expect for the max date in the calendar, so I'm not sure what I'm missing....

Thanks!

13 Replies
Denisg
Contributor III
Contributor III

Hi,

You will find in this attached qvw an example of a Before function with this structure of data. See the Quarter offset on the column headings.

Hope this helps

Cheers

Denis

Dayna
Creator II
Creator II
Author

Lovely, thank you! Sorry, can you confirm the place to look for the Quarter offset? I couldn't see this! 🙂 

Denisg
Contributor III
Contributor III

Hi Dayna,

You see here that the right chart is showing a Before Expression. In yellow, the Quarter 2018-Q2 is displaying the data from the left chart in 2018-Q1 (purple)

Denisg_0-1615977394889.png

 

Dayna
Creator II
Creator II
Author

Thanks for all your help!!