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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
Fiorrie
Creator
Creator

Highlight Number in Chart

Hi Everyone

How can I add condition to put negative values in red please? The below is not working, my numbers are shown in % (its QoQ).

IF($(vMeasure03) = 'QoQ', $(vSalesTrendRev) > 0, red(),'')

Many thanks

1 Solution

Accepted Solutions
sunny_talwar
MVP
MVP

May be you need nested if here

If($(vMeasure03) = 'QoQ',
   If($(vSalesTrendRev) > 0, Red())
)

View solution in original post

13 Replies
sunny_talwar
MVP
MVP

May be you need nested if here

If($(vMeasure03) = 'QoQ',
   If($(vSalesTrendRev) > 0, Red())
)
Fiorrie
Creator
Creator
Author

Unfortunately not working, it is showing 0% everywhere

sunny_talwar
MVP
MVP

0%? This is a color expression, right? I hope you are using this not as your main chart expression 🙂
Fiorrie
Creator
Creator
Author

Ah thanks a lot, its working now (too many hours of development 🙂 )

Fiorrie
Creator
Creator
Author

Also perhaps, any chance you could help with this? I have two codes and I would like to connect them to show only current week of historical data in KPI.

Many thanks

Historical data

(RangeSum(Above(TOTAL Sum({$<[qtr_flag]={1},qtr=>}revenue),0,RowNo(Total)))+
RangeSum(Above(TOTAL Sum({$<[qtr_flag]={2},qtr=>}revenue),0,RowNo(Total)))+
RangeSum(Above(TOTAL Sum({$<[qtr_flag]={3},qtr=>}revenue),0,RowNo(Total))))
/
Sum(Total<qtr>{$<qtr_flag={1,2,3},qtr=>}revenue)

 Current Week

=MAX({$<qtr_flag={0}>}inv_week)

sunny_talwar
MVP
MVP

May be this

(RangeSum(Above(TOTAL Sum({$<[qtr_flag] ={1}, qtr, inv_week = {"$(=Max({$<qtr_flag={0}>} inv_week))"}>} revenue), 0, RowNo(TOTAL))) +
RangeSum(Above(TOTAL Sum({$<[qtr_flag] ={2}, qtr, inv_week = {"$(=Max({$<qtr_flag={0}>} inv_week))"}>} revenue), 0, RowNo(TOTAL))) +
RangeSum(Above(TOTAL Sum({$<[qtr_flag]={3},qtr, inv_week = {"$(=Max({$<qtr_flag={0}>} inv_week))"}>} revenue), 0, RowNo(TOTAL))))
/
Sum(TOTAL <qtr>{$<qtr_flag = {1,2,3}, qtr, inv_week = {"$(=Max({$<qtr_flag={0}>} inv_week))"}>} revenue)
Fiorrie
Creator
Creator
Author

Still showing the last week (13) which is 100%, I dont get it why it is not able to link, when I look at the week separately it is showing me correctly week 9.

sunny_talwar
MVP
MVP

Can you show with images as to what you see and explain as to what the issue is?
Fiorrie
Creator
Creator
Author

Historical.jpg

So I want to show 62% next to 59% (actual), the long code belongs to the chart on the right, but I am still getting the last week 100% (even when I put it in the table it is nicely showing me % per weeks separately)