Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

joshibabu_are
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

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()))

joshibabu_are
New Contributor

Re: Conditional color for Calculated dimension

Hi Sunny,

No Luck only else part showing Green Color.

Thanks,

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
joshibabu_are
New Contributor

Re: Conditional color for Calculated dimension

Hi Sunny,

Still no Luck

Thanks,

joshi

Re: Conditional color for Calculated dimension

Would you be able to share a sample?