Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
darkshadow91223
New Contributor

Exclude negative and positive values from expression

Hi,

I have the expression to calculate difference.

But i only want to show negative difference (Value) also excluding positives values in the calculation. and then vice versa (show +ve, exclude -ve)

Num(1 - Sum({<TimeStamp={'Old'}>}Amount) / Sum({<TimeStamp={'New'}>}Amount), '#,###.#0%')


How do i do this?

Any help please?


Num(1 - (Sum({<TimeStamp={'Old'}>}Amount) / Sum({<TimeStamp={'New'}>}Amount))<0, '#,###.#0%')

Thank you!

3 Replies

Re: Exclude negative and positive values from expression

May be this

Positive Values

Num(RangeMax(1 - Sum({<TimeStamp={'Old'}>}Amount) / Sum({<TimeStamp={'New'}>}Amount), 0), '#,###.#0%')


Negative Values

Num(RangeMin(1 - Sum({<TimeStamp={'Old'}>}Amount) / Sum({<TimeStamp={'New'}>}Amount), 0), '#,###.#0%')

darkshadow91223
New Contributor

Re: Exclude negative and positive values from expression

Thank you! it works!!

Re: Exclude negative and positive values from expression

Awesome, please close the thread by marking the correct and helpful responses.

Qlik Community Tip: Marking Replies as Correct or Helpful

Best,

Sunny

Community Browser