Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all
I wanted to use a variable with parameter and use 'total' as parameter. Like this expression
$(eCountDistinct( total ))
So far so good.
When I want to expand the total with 2 parameter like 'total <product_level1, product_level2>' the comma is interpreted as the end of the variable parameter.
The following examples don't work:
How can I solve this?
In general that's possible - you could replace everything with the parameters but you must be careful how to declare the various parameters and how they are then processed within the variables. If you want to replace nearly everything with multiplen dimensions within totals and set analysis and something more then you will need some efforts to build a stable logic and to find the right syntax for each type.
I think this will be helpful for you: (and read the comments, too)
Comma problem (,) workaround for dollar sign expansion with parameters
- Marcus
Did you try enclosing the parameter with quotes?
$(eCountDistinct(' total <product_level1, product_level2> '))
or
$(eCountDistinct(" total <product_level1, product_level2> "))
I tried that but I didn't work.
Does it work with you?
See if this helps:
eCountDistinct
count(DISTINCT $1, $2 customer)
eExpression
$(eCountDistinct($(vParameter)))
vParameter
1) TOTAL <product_level1,>
2) TOTAL <product_level1, product_level2>
eCountDistinct -- count(DISTINCT $1 customer) -- Here , what you want to achieve
vParameter -- total <product_level1> -- Is that is Garbage error(What is the mean of set expression)
No, I have never had this problem, so it was just my 2c worth
Why not
This is a step forward.
But I still experience some difficulties when I want 3 or more parameters in the total.
I wanted to use this method for some expressions that have 5 dynamic parameters in the total.
see attached
I wanted to use a variable with a parameter so that I can use this for several expressions with different totals.
In this way I have 1 expression to maintain and other expressions that use that one expression with different totals.
I used vParameter just to make it more easy to make changes if you guys wanted 🙂
Your sollution would be plan B.
I thought I could make it more elegant 🙂