Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
New to Qlik and have loaded in my data. I am trying to create 2 buckets based on a value of the column. If the value is a negative number then I want to create a bucket "Neg" and "Pos" if the value is positive. Can someone kindly guide me on where I can create this bucket and how the syntax should look.
Thanks.
You can use the class function to create buckets in your script or in a chart.
If you're bucket is as simple as Positive vs Negative you can create a flag in your script such as
Load,
ID,
Value,
If(Value>0,'Positive',If(Value<0,'Negative')) as Bucket
From xx;
You can use the class function to create buckets in your script or in a chart.
If you're bucket is as simple as Positive vs Negative you can create a flag in your script such as
Load,
ID,
Value,
If(Value>0,'Positive',If(Value<0,'Negative')) as Bucket
From xx;
I was able to create an additional column in the load script to designate whether that row/record is a Positive or Negative value. My next question - I want to create a KPI to show the count of records 'BY' a specific dimension. Let say I want to count the # of positive values by Country. How does the syntax work? When I was using Oracle BI syntax would be similar to Count(Country by Product). Thank you.