Hi,
I am trying to create a calculated field that tells me ‘LOW, MEDIUM or HIGH’ BASED on the percentile 30, and 70 of a column in the dataset.
I have a column named TASA_ORDINARIA in the dataset of Decimal type. As shown below:
I am creating a calculated field with the following code. It works fine:
ifelse(
firstValue({TASA_ORDINARIA},[{TASA_ORDINARIA} ASC],[{TASA_ORDINARIA}]) > percentile({TASA_ORDINARIA}, 30)
, ifelse(
firstValue({TASA_ORDINARIA},[{TASA_ORDINARIA} ASC],[{TASA_ORDINARIA}]) > percentile({TASA_ORDINARIA}, 70)
, ‘ALTA’
, ‘MEDIA’
)
, ‘BAJA’
)
Basicly if the TASA_ORDINARIA of that row is below percentile 30 it will prompt BAJA if is between percentile and 30 return MEDIA and greater than percentile 70 is ALTA.
So far so good.
Now I want to create a vertical bar chart using this calculated field but I am getting this error:
The idea is that I am categorizing every row in 3 clases: BAJA, MEDIA and ALTA and now I want to see the MONTO (amount) of every class grouped by PRODUCTO
Thanks in advance