Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I am using variable parameter but its not working when passing comma (as comma act as a delimiter for a parameter), please suggest how to remove this error
In data editor
SET vScaleNumber=if(($1)>=1000000000, num(($1)/1000000000,'#,##0.0 B') ,
if(($1)>=1000000, num(($1)/1000000,'#,##0.0 M'),
if(($1)>=1000, num(($1)/1000,'#,##0.0 K'),
($1))));
in expression
$(vScaleNumber(Sum({<id={'a','b'}>} (sales*rate))))
In this case you may change the set analysis syntax to:
$(vScaleNumber(Sum({<id={(a|b)}>} (sales*rate))))
and a similar approach might be also possible within another use-cases but probably not in each case.
- Marcus
Probably there is any bracket missing / wrongly placed - independent of the comma-topic by the variable-call. Just check this and remove the superfluous ones because the readability is suffering by them.
- Marcus
@marcus_sommer tried but seems some other issue still getting same error , as an alternative I am using like below
$(vScaleNumber(Sum({<id={'a'}+{'b'}>} (sales*rate))))
With multiple set condition like below, expression 1 is replaced with expression 2
1. $(vMoneyconversion(Sum({<id={'a','b'}, gp={'1'},name-={'N/A'}>} sales*rate)))
2. $(vMoneyconversion(Sum({<id={'a'}+{'b'}> * <gp={'1'}>* <name-={'N/A'}>} sales*rate)))
Hope this work well as well.
You are right that this are syntax-variants for a set analysis to avoid commas by listing multiple field-values and/or fields.
Nevertheless the syntax to specify multiple field-values with: (a|b) should work and didn't result into an error. I assume your real values aren't a and b and therefore you might need to wrap the values with double-quotes, for example if they contain spaces or any special chars, so in the end it may look like:
("aa-100"|"xx yyy")
You could check this logic directly against a list-box of your id-field - just activating it and writing or maybe copying the search-string.
- Marcus