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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
darkshadow91223
Contributor III
Contributor III

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
sunny_talwar

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
Contributor III
Contributor III
Author

Thank you! it works!!

sunny_talwar

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

Qlik Community Tip: Marking Replies as Correct or Helpful

Best,

Sunny