Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Talk to Experts Tuesday, Live Q&A, September 22: Moving from QlikView to Qlik Sense. REGISTER
Showing results for 
Search instead for 
Did you mean: 
Contributor II
Contributor II

Max Year and Current Quarter syntax


I changed my data source from Oracle table to an excel file.

Now my formulas don't work. I assume it is because the numbers are being read as strings.

I have a chart that shows the expenses to date in the current quarter.

I can now do each of them separately but when I try to join them in one calculation to show the max year and current quarter I get an error.

Formula for the Quarter.

=sum( { $< Quarter_number = {'$(vCurrentQuarterNumber)'} >}  Actual )

Formula for the Max Year.

=sum( {$<[Posting Fiscal year]={$(=Max([Posting Fiscal year]))}>}  Actual )

When I put it back together I get an error.

=sum( {$<[Posting Fiscal year]={$(=Max([Posting Fiscal year]))},{ $< Quarter_number = {'$(vCurrentQuarterNumber)'} >}   Actual )

Hopefully I am just missing a coma or something that can be easily adjusted.

Any help would be greatly appreciated. I am on a tight deadline.

2 Replies

I think you have an extra set of {$ in there...

=Sum( {$<[Posting Fiscal year]={$(=Max([Posting Fiscal year]))},{ $< Quarter_number = {'$(vCurrentQuarterNumber)'} >}  Actual)

Try this:

=Sum({$<[Posting Fiscal year] = {$(=Max([Posting Fiscal year]))}, Quarter_number = {'$(vCurrentQuarterNumber)'}>} Actual)


Hi Sunny,

I need to calculate the "count of the Orders" based on "device_type" for this Quarter and last Quarter.  

I tried below one for this Quarter but that is always showing count 0 instead of the actual value.

Count({<ordered_on = {">=$(=Date(Quarterstart(max(ordered_on)), 'MM/DD/YYYY'))<=$(=date(max(ordered_on), 'MM/DD/YYYY'))"}>}device_type), where date format in my db looks like "06/01/2019 05:05:25 PM"

I see more examples using Quarter filters, but i don't want to use Quarter filters in my project. I need it to be applied in a column using Expressions.  I tried modify most of the expressions to my needs from the community and nothing worked. I am looking for the working Expressions 

Please guide me to achieve this.