Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi
Got a question how to use a user variable in a dimension.
I have this dimension definition:
=if(Geography_CountryCode='IT' and Supplier <> 'A' and Supplier <> 'B','Italy')
No i want this part - and Supplier <> 'A' and Supplier <> 'B - to be replaced by a user variable, because i need this formula many places and there might be a C and a D as well
How can i do that?
something like
=if(Geography_CountryCode='IT' and $uvSupplier,'Italy')
doesnt work (of course)
Anyone that can direct me the the right direction?
Hi Flemming,
Try like this
NOT WildMatch(Supplier, $(vSuppliers))
Regards,
Jagan.
Do you want users to select suppliers they do not want. So they would select suppliers they do not want in an input box for example
No in the first part, I would like to maintain the number of suppliers that should not be included in the dimension as a variable - not editable by users
Unsure if this can be done
But if you put the details in an expression and exclude zero it could be done
count({<Call_Supp_Num =- {$(vSupp)}>}Supplier)
with variable set up as vSupp = A,B,C
This would exclude supplier A,B and C and D also if you add to the variable
If you also want D just add as required
But I,m unsure if this is what you want or not.
Hi,
you might refer to dollar sign expansion to buid a parametrizable calculated dimensions.
Dollar-Sign Expansion with Parameters
Parameters can be used in variable expansions. The variable must then contain formal parameters, such as $1, $2, $3 etc. When expanding the variable, the parameters should be stated in a comma separated list.
Examples:
set MUL=’$1*$2’;
set X=$(MUL(3,7)); // returns ‘3*7′ in X
let X=$(MUL(3,7)); // returns 21 in X
Hi Flemming,
Try like this
=if(Geography_CountryCode='IT' and WildMatch(Supplier, $(vSuppliers)),'Italy')
where vSuppliers = 'A', 'B'
Hope this helps you,.
Regards,
Jagan.
Hi Jagan
This is nice, thanks.
How if I want to exclude the list of suppliers, so the wildmatch argument should be <> and not =
Regards
Flemming
Hi Flemming,
Try like this
NOT WildMatch(Supplier, $(vSuppliers))
Regards,
Jagan.
You are a genious...:-)
Thanks a lot - exactly what i needed....
Flemming