Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
upaliwije
Creator II
Creator II

Pivot table

I have follwing Pivot table in my Ducument

NET_RANGE1JanFebMarAprMayJun
<=10000161,11255,27558,16937,642143,96176,705
10,001-25,000322,958322,193220,312196,958189,755250,637
25,001-50,000352,582530,844106,252172,198240,044427,012
50,001-500,000917,284922,3731,959,148629,379291,322653,936
Above 500,001-----925,000
Total1,753,9361,830,6852,343,8811,036,177865,0822,333,290

I want apply above colour scheme if Amount in June Column < Amount in May Column (green) otherwise red

Pls help me to do it

I have wirtten it Text Colur of Expression   like this   =if(match(MONTH,'Jun') , lightRed()) But I do not know how to do it both ways,

1 Solution

Accepted Solutions
boopeshj
Partner - Creator II
Partner - Creator II

Hi

Please find the code and the screenshot.

I have used the data you provided.

if( Month='Jun',

  if(before(sum(Data))>sum(Data),green(),lightred()

  ),

  black())

Note : the Before would work only on a PIVOT table.

Sales Color coding.PNG

Regards,

Boo

Please mark correct answers if you find them.

View solution in original post

3 Replies
karthikoffi27se
Creator III
Creator III

Hi Upali,

In your Pivot Table, In the Expression window expand your Text Color box and enclose the below Definition.

=If(Sum({$<Month={'Jun'}>}Amount)<Sum({$<Month={'May'}>}Amount),Green(),Red())


Capture01.PNG

Many Thanks

Karthik

Anil_Babu_Samineni

Perhaps This...!

vNetRange = Sum(NET_RANGE1)

=Aggr(If($(vNetRange) <= 10000, Green(),

If($(vNetRange) > 10001 and <=500000, Red(),

Black())),NET_RANGE1)

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
boopeshj
Partner - Creator II
Partner - Creator II

Hi

Please find the code and the screenshot.

I have used the data you provided.

if( Month='Jun',

  if(before(sum(Data))>sum(Data),green(),lightred()

  ),

  black())

Note : the Before would work only on a PIVOT table.

Sales Color coding.PNG

Regards,

Boo

Please mark correct answers if you find them.