Reference dimension within "IF" function


Sorry for another stupid question. I’m not sure if I did it wrong but it doesn’t seem I can reference the dimension within “If” formula. For example:

Thank you very much!

I would expect this should work. However, “Corporate” is an alias in the Department dimension for the element “1”. So the value stored against the UX_Demo.Department.Department variable would actually be 1 and not Corporate. If you wanted to test for Corporate then you woudl need to use the variable UX_Demo.Department.Department-alias or UX_Demo.Department.Department::Description

Thanks @cw-ch

It doesn’t work.

I have tried to delete the quotation, it will give me error :frowning:

This sounds like a bug then.
@atrajer the above is from demo model so should be easy to replicate.

@atrajer Could you please help to see if it’s a bug?

Sorry for bothering you!

Thanks :slight_smile:

Just looking at your screenshot, could you confirm what is your instance name in UX? is it “UXDemo”, without the underscore?

Asking as generally speaking, the demo instance name is “UX_Demo”, not “UXDemo”…


Another easy way of checking what value you get from the variable is to add just equals the variable on the formula… or even in the title, to see the result.

Thanks @rmazziero

When I tried to put the “=”:


I have an update on this issue. I came to know that support for resolving setting service variables within formulas in inserted rows or columns was introduced specifically for the DBRW formula and only works within this context. Outside of a DBRW the variable wil not be resolved. Therefore this is expected bahaviour.

1 Like

Thank you very much! @cw-ch