Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Creating Field

Hello -

My data set contains an amount field, with both positive and negative amounts. I would like to be able to filter my dashboard on all positive amounts and I don't want to have to click on all the positive amounts in the listbox. I was thinking the easiest way would be to create a Positive/Negative indicator field that would mark all positive amounts as "Positive" and all negative amounts as "Negative". How would I go about doing that? Is there a better way to filter on all positive or all negative values?

5 Replies
sinanozdemir
Specialist III
Specialist III

In the list box, you can create an expression:

Capture.PNG

If the dimension is greater than 0, then dimension. In this way, you are only pulling the positive numbers.

Hope this helps

Anonymous
Not applicable
Author

use a listbox where you can select your positive values with ">0"

what you mentioned by a indicator field would be created in script by

if value>0,'pos','neg') as Indicator

MarcoWedel

create buttons with search in field actions.

hope this helps

regards

Marco

Clever_Anjos
Employee
Employee

Just type ">0" into your listbox

MarcoWedel

Hi,

one example for selection buttons and an additional field created in the load script:

QlikCommunity_Thread_168633_Pic1.JPG

QlikCommunity_Thread_168633_Pic2.JPG

tabAmounts:

LOAD *,

    Pick(Sign(amount)+2,'negative','zero','positive') as [amount sign];

LOAD RecNo() as ID,

      Round(Rand()*40-20) as amount

AutoGenerate 30;

hope this helps

regards

Marco