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?
Solved! Go to Solution.
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)
Did you try enclosing the parameter with quotes?
$(eCountDistinct(' total <product_level1, product_level2> '))
$(eCountDistinct(" total <product_level1, product_level2> "))
See if this helps:
count(DISTINCT $1, $2 customer)
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)
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.
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 🙂