Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi, I'd like to split a measure into 3 categories to use them as a filter, like so:
=if([% utilizzo fine mese]>1 or [% utilizzo fine mese] = '>100%','>100%',
if([% utilizzo fine mese]>0.85,'>85%', '<85%'
)
)
this code is working perfectly fine for the background colors of the column "% utilizzo fine mese" (where instead of the strings there are the colours), but for some reasons is not working when used as a filter selection.
The code is giving no errors, but when I try to use it, only the '<85%' appears and it doesn't work. I can click on it but it's not selected as a filter.
Thanks!
I assume you need to use the Class function to classify your results into brackets
check the below link for more details:
hope this helps
have you tried to do it on the script?
if([% utilizzo fine mese]>1 or [% utilizzo fine mese] = '>100%','>100%',
if([% utilizzo fine mese]>0.85,'>85%', '<85%')) as "YOURNAME",
The thing is that % utilizzo fine mese is a principal measure created in the analysis, not a column in my table (as per 'age' in the example provided), how can I apply it to my use case?
with "script" you mean the editor?
yes you can use an aggregation with the expression you got
for example:
=AGGR( CLASS ( Max(Date),25) , SerialNo )
replace Max(Date) with your expression
replace SerialNo with the appropriate dimension you want
I'm sorry but I'm not getting it, I need to split the measure into 3 custom categories, so I don't want any dimension.
=AGGR( CLASS ([% utilizzo fine mese], 100) , '>100%' ) ?
yes I do
Hi, it might be useful to understand what you mean by "filter selection", where do you want to write that code line?
In a filter component in a sheet in the analysis:
and then typing the code here:
(sorry for the italian language, but I think it's still understandable)