Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
hi i have years of experience and employees can any one help me in creating a bucket function so that i can put it like 0-10 years then 10-20, 20-30, 30-40. on a block chart
May be create a field in the script or create it as a calculated dimension:
If(YearExperience < 10, Dual('0-10', 1),
If(YearExperience < 20, Dual('10-20', 2),
If(YearExperience < 30, Dual('20-30', 3),
If(YearExperience < 40, Dual('30-40', 4))))
hi sunny but its not working
Where are you doing this? Script or calculated dimension? Can you share a sample where it isn't working?
i am doing on calculated dimensions
Can you share the expression you are using?
use Class function
let vWidth = 10 ;
=dual(replace(Class(Age,$(vWidth)),'<= x <','to'),Class(Age,$(vWidth)))
Ziads code would be the better solution. However if you are using it straight in a chart do
=dual(replace(Class(Age,10),'<= x <','to'),Class(Age,10))