Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
In a chart I have the expression
trim(Mid(RoleName,index(RoleName,chr(32),-1)+1))
that returns the correct result (e.g. PER). I want to use this result in only() function to return the result PERSONEL
=Only({$ <APPLICATION_NAME=,APPLICATION_SHORT_NAME={"=$(=trim(Mid(RoleName,index(RoleName,chr(32),-1)+1)))"}>} APPLICATION_NAME)
I have tried different variations but they all retun --
Can you please help?
Try this without the = sign after the dollar sign:
=Only({$ <APPLICATION_NAME=,APPLICATION_SHORT_NAME={"$(=Trim(Mid(RoleName, Index(RoleName, Chr(32), -1) +1)))"}>} APPLICATION_NAME)
Update: The idea is you want to do this -> APPLICATION_SHORT_NAME = {"PER"} and not APPLICATION_SHORT_NAME = {"=PER"}
try this,
Only({$ <APPLICATION_NAME=,APPLICATION_SHORT_NAME={"=trim(Mid(RoleName,index(RoleName,chr(32),-1)+1))"}>} APPLICATION_NAME)
Thank you all for your suggestions that I am sure would make the expression work. However I discovered that the main reason the expression could not work is that the field RoleName included in the set filter is a dimension that is not recalculated within the chart. Therefore I found a workaround inside the script. Thanks any way.
Works for us. As long as you are able to resolve your issue, we are happy