Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
DJ55
Contributor III
Contributor III

Error in set modifier element function name

I am trying to create KPI to show projected Spend for Current year. so if I select FY 2022 in fiscal year it should show the projected spend for FY 2022 but if I select any year other than FY2022 it should be blank or #NA. 

I have used below expression

num(sum({1<[Posting Fiscal Year_Calc_IM]=${v_YearMax}>}[PurchaseOrderItem.OrderQty]*OriginalNetPrice*Numerator*(if(OriginalCurrency='CAD',1,[Exch. Rate]))/(PriceUnit*Denominator))/1000000,'##.00')

Where V_YearMax is a variable I have created

V_YearMax=MaxString([Posting Fiscal Year_Calc_IM]) 

But then below error is popping up

Error in set modifier element function name :'}' expected

Can anyone suggest or correct this expression?

 

4 Replies
BenjaminT
Partner - Creator
Partner - Creator

Try changing the following within your expression...

[Posting Fiscal Year_Calc_IM]={'$(v_YearMax)'}

BenjaminT
Partner - Creator
Partner - Creator

The value part of each set modifier needs to be enclosed in curly brackets

https://help.qlik.com/en-US/sense/August2021/Subsystems/Hub/Content/Sense_Hub/ChartFunctions/SetAnal...

 

BenjaminT
Partner - Creator
Partner - Creator

I have edited the code in my comment above, the variable name needs to be encased in (). Hopefully that helps get you closer

DJ55
Contributor III
Contributor III
Author

Thank you Benjamin..