Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hiya Guys,
I have created a formula which, given the name of a Dimension (for example) returns whether or not the Dimension exists in the currently selected criteria:
fnIncludeDim: If (GetSelectedCount(_Dims)>0, SubStringCount(uvDimensions, $1 & ';'), 0)
My initial idea was to include this formula (parameterised variable) under each Dimension's "Enable Conditional" field:
=$(fnIncludeDim('TimelineDate'))
This works great - and basically allows me to create a dynamic Straight Table based on which Dimensions the User has selected from a List Box.
However, with many Dimensions (and with a view to making my Dashboard as "generic" as possible so I can reuse it with other datasets) - my question is:
Is there any way to reference the name of the current Dimension from within a formula?
For example, the above "Enable Conditional" formula would become something like (pseudocode!):
=$(fnIncludeDim($CurrentDimensionName))
This way I would be able to use the same formula (variable) for each Dimension, and the "Dimension Name" parameter would be automatically calculated for each Dimension and passed without having to hard-code it for each field.
Hopefully my question makes sense... I realise the answer is probably "No" - but I thought I'd ask you lovely people in case any of you have any ideas 🙂
Cheers,
Steve.
I've been wishing for this feature to exist for years! Something like a function this() or ThisDimension() or ThisExpression() - wouldnt' it be wonderful?
Unfortunately, as far as I know, it doesn't exist - I'd love to be wrong on this one!
I've been wishing for this feature to exist for years! Something like a function this() or ThisDimension() or ThisExpression() - wouldnt' it be wonderful?
Unfortunately, as far as I know, it doesn't exist - I'd love to be wrong on this one!
Thanks Oleg,
Yes, that's exactly what I require - it would be very useful!
I think you might be right - but I'll hang-fire for a little while longer in case anyone else has any insight... keep your fingers crossed! 🙂
Cheers,
Steve.
*BUMP* 🙂
No one else with any ideas?
cheers,
Steve.
You can use GetObjectField. GetObjectField takes the index of the dimension that you want, e.g, 1 for the first. The indexes are absolute, i.e., 1 will always return the first dimension regardless if it's enabled or not.