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: 
paulyeo11
Master
Master

How to remove negative value in chart ?

Hi All

I am using QS Variable , my expression is :-

Pick(Match($(Var),1,2,3),GROUP_CLASS,BRAND_,SEGMENT_)

negative value.png

I am aware that  "fabs" can help to remove the -ve value , but then i when i try below , it does work :-

fabs(Pick(Match($(Var),1,2,3),GROUP_CLASS,BRAND_,SEGMENT_))

Hope some one can advise me.

Paul

1 Solution

Accepted Solutions
ogster1974
Partner - Master II
Partner - Master II

have you tried including it in your match statement?

Pick(Match($(Var),1,2,3),fabs(GROUP_CLASS),fabs(BRAND_),fabs(SEGMENT_)))

View solution in original post

7 Replies
ogster1974
Partner - Master II
Partner - Master II

have you tried including it in your match statement?

Pick(Match($(Var),1,2,3),fabs(GROUP_CLASS),fabs(BRAND_),fabs(SEGMENT_)))

maxgro
MVP
MVP

or rangemax if you want to set the <0 values to 0

Pick(Match($(Var),1,2,3),

     rangemax(GROUP_CLASS,0),

     rangemax(BRAND_,0),

     rangemax(SEGMENT_,0)

     )

paulyeo11
Master
Master
Author

Hi Andy

Thank you very much it work fine now.

Paul

ogster1974
Partner - Master II
Partner - Master II

HI Paul

I'd take Jonathan advice to. As was perfectly valid although its appeared to have disappeared from the thread.  You are excluding perfectly valid data from your chart using this method.

With both mine and Massimos approach you should include perhaps a footnote or subtitle message letting the user know what and why you excluded certain data.  They have to trust it so any cavets to your charts should be explained.

Or perhaps with my BI hat on I would be wondering why I had a negative in the first place if I didn't want one?  Is there a data quality issue in my model or the raw data that needs addressing?  Don't be afraid/ hide outliers they are your friend.  This is what both Sense and View is good at doing.

Regards

Andy

paulyeo11
Master
Master
Author

Hi Andy

Yes i very sorry i just want to delete previous post , because that post consist of sensitive information. and Jonathan post was accidentally deleted.

Yes i do support what Jonathan advise , it is not right to use fabs.

I will add foot note to make remark on chart use fabs.

By the way any idea , i can reduce my qvf file to 10% ? instead of i need to remove the post.

Paul

ogster1974
Partner - Master II
Partner - Master II

Can you post more detail on your question.

paulyeo11
Master
Master
Author

Hi Andy

QS how to reduce the data ?

Above link is my question.

Paul