Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
2 columns in table:
one column :unit no. (i.e 34243) and the second : corresponding distance data (i.e 1.1767).
Need:
To write for each distace range (0-1, 1.5-2) how many units there are in that range.
What query do i have to use in the expression editor?
thanks in advance!
Dimension:
class(Distance)
Measure: count(UnitNo)
I.e. you use a calculated dimension.
can you help me with syntax of class? for example if i want between the range 1-1.5 miles
If you want each half mile, and the Distance field is in units of Miles, then
class(Distance, 0.5)
will work.
Hi,
Try like this in script
LOAD
*,
If(distance > 1.5 AND distance <=2, '1.5-2',
If(distance >0 AND distance <= 1, '0-1', 'Other')) AS Range
FROM DataSource;
Now in just use this
Dimension: Range
Expression: Count(UnitNo)
Hope this helps you.
Regards,
Jagan.
you gave me this solution and it worked:
class(Distance, 0.5)
Now instead of Distance data I created calc dimension which called CalcDist, in Qlik sense
But if Now I change the name of the field in the command:
class(CalcDist, 0.5)
it says it is bad field name..
any advise??