Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
HI,
In a pivot table, I am trying to create an expression label that displays the Expression field minus the square brackets for example
Expression definition:
[Event Outcome]
Expression Label:
I want to show: Event Outcome (eg expression definition with out the [ ] brackets)
Kind regards
Dan
Can't you just use the field "Label" on your Expresion tab for that?
Hi Dennis,
Thank you for the reply. I could type this in manually in the expression label however I am hoping there is an automatic way to do this as I have to do this for multiple columns. Sorry I should have explained this in my original post.
kind regards,
Dan
the easiest and most secure solution would be to just rename your expression.
if you can load your expression name somehow as a variable,you could use mid() to show only the text between the brackets.
mid(label,2,12)
Where do the brackets come from? If they come from table names, you can try rename them in your script, is that an option?
Load
[Event Outcome] as "Event Outcome"
...
The brackets are there because there is a space in the Field name. I could rename fields to have no Space or Underscore however this is not ideal. Alexander I think your idea is a good approach however how can we ‘load the expression name’?
We can also use replace instead of mid but the part I can not work out is loading the expression name to put into the formula!!!!
Thanks again,
Dan
I don't see why the bracets end up in your application. Whenever I define fields with bracets they dissapear automaticly.
The script below will result in an application with the field name Record number without bracets.
LOAD
recno() as [Record number]
AUTOGENERATE 500
;
Could you provide a sample qvw file to show us the problem?
daniel.garge wrote:
however how can we ‘load the expression name’?
this was a theoretical solution. ive only tryed this with data fields and their names.
since its an expression, it is now stored in the memory like the objects from the data tables
Thanks Alexander, Are you able to explain how you did this for data field? Hopefully from there I can work out how to retrieve/reference the expression definition.
Kind regards,
DAn