Skip to main content

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Skip the ticket, Chat with Qlik Support instead for instant assistance.
cancel
Showing results for 
Search instead for 
Did you mean: 
ashis
Creator III
Creator III

Text color in red for calculated dimension

Hi,

I have a calculated dimension like the following

aggr(sum({<xxx=,Date={"$(vVariable)"}>}YYYY),AAA,BBB))

I want to print negative value in Red. so in text color I put the below code

if(  aggr(sum({<xxx=,Date={"$(vVariable)"}>}YYYY),AAA,BBB)))<0,RGB(255,0,0),black()

As a result I am getting some negative value as red and some negative value are not in red. This is very strange .

Even if I put NUM function before the aggr the result is same.

Any help much appreciated.

28 Replies
Anil_Babu_Samineni

That means, You have only -Ve values not the +ve values

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
jyothish8807
Master II
Master II

Hi Ashis,

Are you trying this in a straight table ? If so then make it an expression:

Dimension 1: AAA

Dimension 2: BBB

Expression:  aggr(sum({<xxx=,Date={"$(vVariable)"}>}YYYY),AAA,BBB))


for text color: if(Sum(Aggr(Sum({<xxx=,Date={"$(vVariable)"}>}YYYY),AAA,BBB))<0,RGB(255,0,0),Black())

Best Regards,
KC
ashis
Creator III
Creator III
Author

No , I am using in a pivot table.

jyothish8807
Master II
Master II

No problem. The same goes in case of pivot also.

can you please share what is your dimension and expressions ?

Br,

KC

Best Regards,
KC
Anil_Babu_Samineni

And do you have any cyclic Group / Drill down??

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
ashis
Creator III
Creator III
Author

Hi Jyothish,

Following are my calculated dimension and expression for text color.

dimension =aggr(sum({<xxx=,Date={"$(vVariable)"}>}YYYY),AAA,BBB))

text color=if(  sum(aggr(sum({<xxx=,Date={"$(vVariable)"}>}YYYY),AAA,BBB))))<0,RGB(255,0,0),black()

ashis
Creator III
Creator III
Author

Yes in this chart I have one drill down .

Anil_Babu_Samineni

I think this makes wrong?

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
jyothish8807
Master II
Master II

Hi Ashis,

Try to convert this dimension into expression and use the same text color condition.

Br,

KC

Best Regards,
KC
ashis
Creator III
Creator III
Author

Hi Jyothish,

If I convert the dimension into expression and use the same text color condition , it is working fine.

However my need is to display as dimension.