Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Negative Values in Chart

Hi All,

In  application There are two dates eg-DATEA  ,DATEB, Requirement is that DATEB-DATEA  we did that  fine  in straight table,

but we are getting negative vaues in some cases, how negative values should show as 0 or dont show any value delete that record

Note:: should do in back end,plz i want logic for this

1 Solution

Accepted Solutions
Not applicable
Author

Hi satish,

I need some clarification, Are you subtracting dates here?

If you clarify this I will try to post answer.

If my understanding is correct, You can find solution in attached .qvw.

Hope it helps you

BR

Susvith

View solution in original post

7 Replies
Not applicable
Author

Hi satish,

I need some clarification, Are you subtracting dates here?

If you clarify this I will try to post answer.

If my understanding is correct, You can find solution in attached .qvw.

Hope it helps you

BR

Susvith

MK_QSL
MVP
MVP

If((DATEB-DATEA) <0,0,(DATEB-DATEA) ) as FieldName

maxgro
MVP
MVP

rangemax(0, DATEB-DATEA) as newfielddatediff

Not applicable
Author

hi,

requirement is dateA and dateB two dates if dateA-dateB(subtraction) then negative values are coming in chart they want to remove negative vale recors from application or change them to zero this shoulb  be in back end

Not applicable
Author

Hi satish,

Then I guess I got it right. Did you check the qvw attached ?

BR

Susvith

Not applicable
Author

Hi Susvith,

its working,thanku for your time.

MarcoWedel

for Null values:

LOAD DATEB,

          DATEA,

          If(DATEB>=DATEA,DATEB-DATEA) as Days

FROM ...

regards

Marco