Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
amit_saini
Master III
Master III

Condition Help..!!!

Hi Folks,

I'm having two fields:

  1. Actual Inventory Value
  2. Target Inventory Value

Mentioned below I'm having expressions against them:

Actual Inventory Value= sum(MBEW_SALK3)

Target Inventory Value =((if ( rowno(total)>=1 and Dimensionality() <>'1',

Sum ([Recpt/reqd_MNG01])/

len(keepchar(mid(Workingdays,Day_DSDAT,42 ),'1')),

Sum ([Recpt/reqd_MNG01])/

(sum(aggr(distinct  len(keepchar(mid(Workingdays,Day_DSDAT,42 ),'1')),[T001-BUKRS],WERKS,[Profit Ctr_PRCTR], MDKP_MATNR, DSDAT)) 

/ count( MatNr_Txt))

)) *ZKMM_PROD01_Target *(if ( rowno(total)>=1 and Dimensionality() <>'1',

sum(MBEW_STPRS)/sum(MBEW_PEINH),

sum(MBEW_SALK3)/sum(TotalStock_LBKUM)

)))

Requirement :  If [Actual Inventory Value] <= than [Target Inventory Value] display value in GREEN otherwise RED

Please help me how to do this in pivot table.

Thanks,

AS

3 Replies
Not applicable

Could u pls specify ur requirement in detail.

Like do u want to display the background color of both the expressions as green if [Actual Inventory Value] <= than [Target Inventory Value] ? or u want to change the value color do be changed??

Not applicable

1. Create 2 variables  vActualInventoryValue and vTargetInventoryValue.

Assign ur expressions to it.

2. Go to expression tab. Click on expression sign and go to text color

.write the below expression there:

if($(vActualInventoryValue)<= $( vTargetInventoryValue)),Green(),Red());

Hope this will help you..!

preminqlik
Specialist II
Specialist II

use this expression in background color or text color

=if(column(1)<=column(2),lightgreen())