I need to create many custom stats, and it takes a long time to copy expressions and change the columns to "format type".
I would like to know the original expression, so that automatically the program adjusts the expression of "format type" with "Value expression", as the following example:
Value expression:
- Code: Select all
Columna_2
Format type (manually changing the expression):
- Code: Select all
format( '{1}', if ( columna_2 >0 and columna_2 <100, format('({1})', format_number(columna_2, 0, false, false)), '' ) )
Format type (without changing "This" by "columna_2"):
- Code: Select all
format( '{1}', if ( this >0 and this <100, format('({1})', format_number(this, 0, false, false)), '' ) )
With the latter "format type" I don't have to copy the column and replace it with "this", which saves me a lot of copy/past time.
The question:
How do I play the last "format type" to avoid changing the expression manually in the next case?
Value expression:
- Code: Select all
(Columna_1/columna_2) * 100
Format type:
- Code: Select all
if((columna_1 / columna_2) * 100 >= 99,99, format_number( (columna_1 / columna_2) * 100 , 2 , false , false ))
Logically replacing the columns with "This" does not work, I think I should use strings as in the first example (format( '{1} {2}',).....
But I can't create the right expression, is it so kind to expose a complete example plz?