Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Good afternoon,
Hoping someone might be able to assist. I'm using the below code within a user defined custom table extension to check whether a master measure (e.g. Get Dimension (=GetObjectDimension()) has a length greater than 1 - basicially works out how many dimensions are visible (maximum of 4). The dimension names are then pulled through to produce an accurate denominator value when calculating percentages based on the dimensions shown.
I've noticed however, that whilst this works for fields of a single word or no spaces, when fields with a space or character (e.g. '/' or '-'), it doesn't calculate as I'm assuming it doesn't recognise the field name.
I've tried adding an additional set of square brackets and also have tried double quotes around the master measure name.
=if(len([Get Dimension (4th Dimension)])>1,aggr(nodistinct count(FTE),$(=[Get Dimension]),$(=[Get Dimension (2nd Dimension)]),
$(=[Get Dimension (3rd Dimension)]),$(=[Get Dimension (4th Dimension)])),
if(len([Get Dimension (3rd Dimension)])>1,aggr(nodistinct count(FTE),$(=[Get Dimension]),$(=[Get Dimension (2nd Dimension)]),
$(=[Get Dimension (3rd Dimension)])),
if(len([Get Dimension (2nd Dimension)])>1,aggr(nodistinct count(FTE),$(=[Get Dimension]),$(=[Get Dimension (2nd Dimension)])),
if(len([Get Dimension])>1,$(=[Get Dimension])),
count(total (FTE))))))
Does anyone have any ideas?
Any help is most appreciated.
Matt
I think the brackets are wrongly placed - inside the $-sign Expansion without a combining with the field respectively expression-result. This means it should be rather look like: $(='[' & Expression & ']') or it's just placed on the outside like:
[$(= any content)]
- Marcus
Hello, have you tried using a function replace a name with these names to be able to calculate?
here it is in Portuguese BR, just to change to your language:
I haven't but I did find the solution. Inside the master measure, I added single quote, double quotes, single quote and an & at either end (see below) and it works!
='"'&GetObjectDimension()&'"'
Happy Days!
I think the brackets are wrongly placed - inside the $-sign Expansion without a combining with the field respectively expression-result. This means it should be rather look like: $(='[' & Expression & ']') or it's just placed on the outside like:
[$(= any content)]
- Marcus
Unfortunately your link doesn't seem to work. I'm interested in finding out more though.
Thanks I'll take a look.
Well it worked seemingly for a couple of minutes then it broke and I can't get it working again 😞