Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello everybody,
I want to display in my chart only the value for Company Name = A disregarding selection. It should be always A - as Overview
I have two colums. For the first it works, for the second it doesn't.
My expression column1:
sum({<NAME={'A'}>} VALUE) (that works!)
My expression column 2 - doesn't work:
=sum({<NAME={'A'}>} $(v_gross_expenditure))
where v_gross_expenditure is defined in script with:
set v_gross_expenditure = 'SUM(GROSS_REGION)/SUM(COMPANY_REGION)';
Thanks a lot!!
Unfortunatly that doesn't help.
But now I got the solution by myself:
Sum({<NAME={'A'}>}GROSS_REGION)/SUM({<NAME={'A'}>}COMPANY_REGION)
Does anybody know a better solution with using the function v_gross_expenditure, perhaps experts like stalwar1?
You created without equal sign in script? May be this
SUM({<NAME={'A'}>}AGGR( $(=v_gross_expenditure), GROSS_REGION,YEAR))
Unfortunatly that doesn't help.
But now I got the solution by myself:
Sum({<NAME={'A'}>}GROSS_REGION)/SUM({<NAME={'A'}>}COMPANY_REGION)
Does anybody know a better solution with using the function v_gross_expenditure, perhaps experts like stalwar1?
No, this is actually the correct way of doing it. The variable can take parameters, but after all, you are using two different expressions which need to have their own set analysis each, one for GROSS_REGION and the other for COMPANY_REGION.
Maybe you could take a look at alternate states:
https://help.qlik.com/en-US/qlikview/November2017/Subsystems/Client/Content/Alternate%20States.htm
You can close your response as correct answer. And, this we forget to filter in script