Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
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