Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
On Demand Webinar: See WhyThousands of QlikView Users Have Switched to Qlik Sense. REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
yuvaraj_g
Contributor III
Contributor III

How to change the background color in pivot table if total value is 0

Hi,

I have pivot table it contains data for Jan to Dec month. Finally it shows the total values. Here I need to change the background color if total value contains 0 that entire row will appear into blue color.

For Example:

nprintimg.png

Here I have total column if it contains value 0 the entire row background color should be in blue. Colud you please help me on this issue.

Regards,

Yuvaraj

7 Replies
niclaz79
Partner
Partner

Hi, is the value null() or 0?

Regardless, you should be able to in the background color expression set the following:

if(Alt(Sum(TOTAL <Name>YourValue),0) = 0. Blue())

venkatasreekant
Specialist
Specialist

Hi,


In expression click on + symbol, in that Background Color  write the condition like


IF(Sum(Total) = 0 , Blue())



Thanks,

Venkata Sreekanth

yuvaraj_g
Contributor III
Contributor III

I have created that Total column in show partial sums for Month dimension in pivot table under presentation tab. In which place if i place the expression it will work perfect?

niclaz79
Partner
Partner

Hi, it would be easier then to reference the column in the expression itself, that way you can change the calculation in Total if needed and the if-statement will be referencing the updated expression.:

if([total]=0, Blue())

yuvaraj_g
Contributor III
Contributor III

Yes, in expression itself we can able to achieve that but if place this expression in background the blue color appears into all 0 values but for us if total value 0 then that entire row must be converted into blue.

niclaz79
Partner
Partner

You have to have the same background expression for all your calculations + your dimension.

yuvaraj_g
Contributor III
Contributor III

Yes.here what i actually did in pivot table, i have month as dimension after creating pivot table i dragged the month dimension to new dimensions now it consider as every month as dimension.

for example:

before dragging

Month

Jan

Feb

Mar

After dragging into new dimensions,

Month Jan Feb Mar like this thats why i can't able to fix this.