# QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

New Contributor

## Conditional color for Calculated dimension

Hi All,

i have Calculated Dimension like Below:

=Num(Aggr(Count(DISTINCT{<Bucket={On_Time}>}Employee_Number)/Sum(Aggr(Count(DISTINCT Employee_Number), Org_Hier.ORGANIZATION, Bucket, MonthBucket)), MonthBucket),'#,##0.00%')

i want to show Conditional color based on above dimension.

Example:

If (Compliance %) is   <=90   Red

>=91 and <=94   Yellow

95 and above Green

I have tried below expression but not working.

=if(num(Aggr(sum(aggr(Count(DISTINCT{<Status={Ontime}>}Employee_Number),[Updated Location],Region_Name,Site_Name, Status,Complaince_Training_Program, MonthBucket))/
Sum(Aggr(Count(DISTINCT Employee_Number),[Updated Location],Region_Name,Site_Name, Status,Complaince_Training_Program, MonthBucket)), MonthBucket),'##,#0%') <=90,RGB(255,0,0),Yellow())

How to achieve in Calculated Dimension,

Any Help would be greatly appreciated.

Thanks

Joshi

Tags (1)
5 Replies
MVP

## Re: Conditional color for Calculated dimension

May be try this

If(Aggr(Count(DISTINCT{<Bucket={On_Time}>}Employee_Number)/Sum(Aggr(Count(DISTINCT Employee_Number), Org_Hier.ORGANIZATION, Bucket, MonthBucket)), MonthBucket) <= 0.90, RGB(255,0,0),

If(Aggr(Count(DISTINCT{<Bucket={On_Time}>}Employee_Number)/Sum(Aggr(Count(DISTINCT Employee_Number), Org_Hier.ORGANIZATION, Bucket, MonthBucket)), MonthBucket) <= 0.94, Yellow(), Green()))

New Contributor

## Re: Conditional color for Calculated dimension

Hi Sunny,

No Luck only else part showing Green Color.

Thanks,

MVP

## Re: Conditional color for Calculated dimension

Can you try this?

If(Count(DISTINCT{<Bucket={On_Time}>}Employee_Number)/Sum(Aggr(Count(DISTINCT Employee_Number), Org_Hier.ORGANIZATION, Bucket, MonthBucket)) <= 0.90, RGB(255,0,0),

If(Count(DISTINCT{<Bucket={On_Time}>}Employee_Number)/Sum(Aggr(Count(DISTINCT Employee_Number), Org_Hier.ORGANIZATION, Bucket, MonthBucket)) <= 0.94, Yellow(), Green()))

Highlighted
New Contributor

Hi Sunny,

Still no Luck

Thanks,

joshi

MVP

## Re: Conditional color for Calculated dimension

Would you be able to share a sample?