Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I have such expression for chart.
$(=concat('if($Field=' & chr(39) & $Field & chr(39) & ',sum({1<REGION = {' & $(vRegSelect) & '}>} [' & $Field & '])', ',') & concat(right($Field&')',1)))
But I want to use another IF there: if variable vRegSelect = 'EMEAR' then sum everything without selection ("{1}") ELSE sum for region.
Above I have summing for specific region which is set to variable vRegSelect, but when I want to add such if like this:
$(=concat('if($Field=' & chr(39) & $Field & chr(39) & ',sum(if(' & $(vRegSelect) & '=EMEAR,{1},{1<REGION = {' & $(vRegSelect) & '}>})[' & $Field & '])', ',') & concat(right($Field&')',1)))
It doesn't work :-(.
Probably it's because those brackets near EMEAR, but I don't know how to use text in text
Try this:
$(=concat('if($Field=' & chr(39) & $Field & chr(39) & ',sum(' & if('$(vRegSelect)'='EMEAR','{1}','{1<REGION = {' & $(vRegSelect) & '}>}') & ' [' & $Field & '])', ',') & concat(right($Field&')',1)))
- Ralf
Try:
$(=concat('if($Field=' & chr(39) & $Field & chr(39) & ',sum(if(' & $(vRegSelect) & '='&chr(39)&EMEAR&chr(39)& ',{1},{1<REGION = {' & $(vRegSelect) & '}>})[' & $Field & '])', ',') & concat(right($Field&')',1)))
If this doesn't work, try to share your app with sample data.
Not working .
I've attached example to work with.
Also dosen't work.
Just shared :-). Lesson from another topic learned
Well, field names are case sensitive (Region instead of REGION) and $-expansion doesn't work inside:
$(=concat('if($Field=' & chr(39) & $Field & chr(39) & ',sum(' & if(GetFieldSelections([RegName],',')='EMEAR','{1}','{1<Region = {' & $(vRegSelect) & '}>}') & ' [' & $Field & '])', ',') & concat(right($Field&')',1)))
Thank you, that's it.
But in meanwhile I've created next series and now I'm hiding and showing correct expression according to Region selection .
PS. I don't know why I don't have buttons with "correct" answer. Maybe I forgot to check that this topic is a question.