Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
bobbydave
Creator III
Creator III

Bringing trigger into expression

So I am using nPrinting 17.5 and I've noticed that there is a bug that it doesn't like triggers when picking up the qvw.

My app has a trigger that OnActivateSheet(),

Field: Fiscal_Year_Month_Num

Search String: = '>='& vFiscalYearMonth1Year

where vFiscalYearMonth1Year =num(addmonths(MonthStart(today()),-15))

I am instead trying to bring this into my expression so that I can apply it to all my graphs rather than depend on the Trigger

Including the >= symbols is screwing up my set analysis.

Any ideas?



sum({<OffSystem.CountryCode-={'UK'},OffSystem.Measure={'New Claims added to Off-Systems MTD'},OffSystem.CoverType-={'Total'}>}OffSystem.MeasureValue)
+ sum({<%Calendar={'>= 41273'}, OffSystem_Reg.CountryCode-={'UK'}, OffSystem_Reg.Measure={'New Claims Added to Off-Systems MTD'}, OffSystem_Reg.CoverType-={'Total'}>}OffSystem_Reg.Value) 

3 Replies
Or
MVP
MVP

Directly from the Set Modifiers help page:

sum( {$<Year = {“>1978<2004”}>} Sales )

Returns the sales for the current selections, but with a numeric search used to scope the range of years to sum the sales across.

Hopefully that'll fix your >= problem.

bobbydave
Creator III
Creator III
Author

The variable changes. I am trying to create a graph that shows the last 15 months.

This month will show May 2017-July2018, next month variable will change to June 2017-Aug 2018 and so on so hardcoding wont work

Or
MVP
MVP

I think the focus here is on using double quotes rather than single quotes, but if that's still not going to solve your problem, you could try sticking the quotes directly into the variable - I think set analysis would parse it correctly if the contents of the variable were ">Formula()". Not 100% sure though.