Qlik Community

QlikView Layout & Visualizations

Discussion Board for collaboration on QlikView Layout & Visualizations.

Announcements
Coming your way, the Qlik Data Revolution Virtual Summit. October 27-29. REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Contributor II
Contributor II

Text Color Expression not working in totals of Straight Table

Hi everyone,

my first post/question here...

I have an issue with totals in a straight table. In the text color expression within my 'YoY' expression,yoy.JPG I have calculated colors based on threshold values (positive = green, 0 = black, negative = red) , expression here:

=If(($(vCSATAMS) - $(vDSATAMS))-($(vCSATL1AMS) - $(vDSATL1AMS)) <0.005 and

($(vCSATAMS) - $(vDSATAMS))-($(vCSATL1AMS) - $(vDSATL1AMS)) > -0.005, Black(),

If(($(vCSATAMS) - $(vDSATAMS))-($(vCSATL1AMS) - $(vDSATL1AMS)) >0.005, Green(), LightRed()))

Until here, everything works fine, but the totals. They are not following the text color expression and text color of total is always red, no matter if it's a positive or zero number. I have "average" in Total Mode, because with Expression Total it just doesn't show any totals.

table.JPG totalmode.JPG

Any suggestion here?

Thanks

1 Solution

Accepted Solutions
Highlighted
Partner
Partner

Hi,

Try using Visual Cues Tab in Straight Table (ref. image attach)

OR

Custom Format Cell (ref. image attach)

View solution in original post

9 Replies
Highlighted
Partner
Partner

Hi,

Try using Visual Cues Tab in Straight Table (ref. image attach)

OR

Custom Format Cell (ref. image attach)

View solution in original post

Highlighted
Specialist III
Specialist III

Hi,

If you want your totals to change, then you need to use Dimensionality() function. Where the Dimensionality() = 0 is the totals row.

Hope this helps.

Highlighted
Specialist
Specialist

I would follow what Sinan has recommended, you need to use Dimensionality() function to get the color right for Total

Highlighted
Contributor II
Contributor II

Hi @Sinan, thanks for the advice,

I'm not sure about how to use Dimensionality(), I've tried this but it's doing the same...

=If(Dimensionality()<>0,If(($(vCSATAMS) - $(vDSATAMS))-($(vCSATL1AMS) - $(vDSATL1AMS)) <0.005 and

($(vCSATAMS) - $(vDSATAMS))-($(vCSATL1AMS) - $(vDSATL1AMS)) > -0.005, Black(),

If(($(vCSATAMS) - $(vDSATAMS))-($(vCSATL1AMS) - $(vDSATL1AMS)) >0.005, Green(), LightRed())),

If(Dimensionality()=0,If(($(vCSATAMS) - $(vDSATAMS))-($(vCSATL1AMS) - $(vDSATL1AMS)) <0.005 and

($(vCSATAMS) - $(vDSATAMS))-($(vCSATL1AMS) - $(vDSATL1AMS)) > -0.005, Black(),

If(($(vCSATAMS) - $(vDSATAMS))-($(vCSATL1AMS) - $(vDSATL1AMS)) >0.005, Green(), LightRed()))))

Please, correct me if I'm wrong, thanks.

Highlighted
Specialist III
Specialist III

Try the below:

=If(($(vCSATAMS) - $(vDSATAMS))-($(vCSATL1AMS) - $(vDSATL1AMS)) <0.005 and

($(vCSATAMS) - $(vDSATAMS))-($(vCSATL1AMS) - $(vDSATL1AMS)) > -0.005, Black(),

If(($(vCSATAMS) - $(vDSATAMS))-($(vCSATL1AMS) - $(vDSATL1AMS)) >0.005 And Dimensionality()>=0, Green(), LightRed()))

Hope this works.

Highlighted
Contributor II
Contributor II

Thanks Sinan, but still not working...

Actually, if I put only Dimensionality()=0, the color is only in totals, but still red.

table.JPG

Any other suggestion? 😕

Highlighted
Contributor II
Contributor II

Visual cues did it!

I was trying to do it inside the expression, but this worked perfectly anyway.

Thanks Hiren!!

Highlighted
Specialist III
Specialist III

Can you post the app? or just a small portion of it at least? Well, if you want to color change to be all the expressions including the total row, then you use Dimensionality() >= 0. If you only want the total row to change, then Dimensionality() = 0.

A sample app would be helpful at this point.

Thanks

Highlighted
Contributor II
Contributor II

Thanks for the help Sinan,

I'd tried with both (>=0 and =0) and total remains red.

I did it with visual cues as Hiren recommended. But I will try with dimensionality too and will let you know how it's going.

Thanks for the help