Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
How to write syntax for Bucketing ? How above Expression works ?
Hi,
If in general, without seeing the data. You have a field named [From-To State Code].
Count(Distinct[From-To State Code]) - counts number of unique (non-repeating) values in the field [From-To State Code].
Function Class returns a string with a range of 100.
For example,
1) if Count(Distinct[From-To State Code]) = 45, expression Class(Count(Distinct[From-To State Code]), 100) return a string '0<=x<100'
2) if Count(Distinct[From-To State Code]) = 156, expression Class(Count(Distinct[From-To State Code]), 100) return a string '100<=x<200'
3) if 100 to replace 400 and Count(Distinct[From-To State Code]) = 620, expression Class(Count(Distinct[From-To State Code]), 400) return a string '400<=x<800'
For more information about function Class(), see here class ‒ QlikView
Regards,
Andrey
Thank you so much