Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello All,
I have a value in my data which hyphen . It is a string value like 'abc-dce'
I need to use it my set analysis and calculation to filter based on that value.
but if I pass that value , it results in the below error.
"Error: Error in set modifier ad hoc element list:
',' or ')' expected"
Below is the KPI Calculation
=num(Sum({<Region={$(vRegionView)},PeriodFlag={'YTD'}>}NET_SALES_ACT)/Sum({<Region={$(vRegionView)},PeriodFlag={'YTD'}>}NET_SALES_BUD)*100,'###.#')&'%'
vRegionView==TRIM(REGION_VIEW)
Only when I select value in Region View with the hyphen in the string , it will result in error.
Please advise.
I wonder, Where did you created the variable? Perhaps this way If you create variable in Overview?
=num(Sum({<Region={[=Region=$(vRegionView)]},PeriodFlag={'YTD'}>}NET_SALES_ACT)/Sum({<Region={[=Region=$(vRegionView)]},PeriodFlag={'YTD'}>}NET_SALES_BUD)*100,'###.#%')
Hello ,
Thanks for your reply . If I changed it to below expression given by you, It just returns 0.0 for all the selections which is not correct
What it is returning when you have applied below
=num(Sum({<Region={"=Region=TRIM(REGION_VIEW)"},PeriodFlag={'YTD'}>} (NET_SALES_ACT/NET_SALES_BUD)*100), '###.#%')
Did Anil's latest post help you get what you needed for your use case? If so, please do not forget to return to the thread and use the Accept as Solution button on his post that helped get things working. This gives credit to him for the assistance as well as letting other Community Members know what actually worked.
One other area you can search in the future to find potential assistance is the following:
https://community.qlik.com/t5/Qlik-Design-Blog/bg-p/qlik-design-blog
There are hundreds of how-to related posts in that area, they can be a bit tricky to find sometimes, but generally you will likely find something to help in many cases.
Regards,
Brett
You will need to enclose the variable reference in single quotes:
'$(vRegionView)'
-Rob
http://masterssummit.com
http://qlikviewcookbook.com
http://www.easyqlik.com