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: 
Anonymous
Not applicable

More than and Less than

I need to create one column that provides total more than $1.00

Another column when total are negative less than 1.00

1 Solution

Accepted Solutions
ramoncova06
Partner - Specialist III
Partner - Specialist III

COLUM 1

if(RANGESUM(A-B)) > 0, RANGESUM(A-B))

COLUMN 2

if(RANGESUM(A-B)) < 0, RANGESUM(A-B))

View solution in original post

6 Replies
Gabriel
Partner - Specialist III
Partner - Specialist III

Hi,

Even though the question is not completely clear, but I will attempt to answer your question.

You probably want to have something in the script like this

Data:

LOAD * INLINE [

    ID, Amount

    1, 1.2

    2, 100

    3, 2.1

    4, 0.9

    5, 0.6

    6, 0.7

    7, 80

    8, 90.5

  

];

LEFT join (Data)

LOAD

ID,

Amount            AS [Less Than 1]

Resident Data

WHERE Amount < 1;

LEFT join (Data)

LOAD

ID,

Amount            AS [Greater Than 1]

Resident Data

WHERE Amount > 1;

trdandamudi
Master II
Master II

The question is not clear, can you give some more details...

Anonymous
Not applicable
Author

I am entering  =A-B  I receive a total Amount which is correct.  Issue  some values are Positive and Some are Negative.

I need two columns -  One I want to return all of the Positive Amounts and the 2nd to return all the Negative.

Example calculations in Excel  - Trying to produce the same results

=IF(J9-M9<1,J9-M9,0)

=IF(J8-M8>0,J8-M8,0)

.   

ramoncova06
Partner - Specialist III
Partner - Specialist III

COLUM 1

if(RANGESUM(A-B)) > 0, RANGESUM(A-B))

COLUMN 2

if(RANGESUM(A-B)) < 0, RANGESUM(A-B))

MarcoWedel

why is it an issue that some values are positive and others negative?

MarcoWedel

an alternative to using two expressions might be a calculated dimension and a single expression:

QlikCommunity_Thread_217037_Pic1.JPG

QlikCommunity_Thread_217037_Pic2.JPG

QlikCommunity_Thread_217037_Pic3.JPG

hope this helps

regards

Marco