Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
karthikeyan1504
Creator III
Creator III

Conditional color issue by cyclic group dimension in bar chart

Hi all,

I am facing an issue in bar chart with conditional color based on the cyclic group dimension which has four dimension inside.

For example,

Every dimensions in the cyclic group has different values as shown below,

Values of Dimension 1 in cyclic group:

Shipping document tracking: '<5 Days', '5 to 7 Days', '>7 Days'

Values of Dimension 2 in cyclic group:

Lead time tracking: '<5 Days', '5 to 7 Days', '>7 Days'

Values of Dimension 3 in cyclic group:

Buyer Payment tracking: 'On Time', '5 to 7 Days', '>7 Days'

Values of Dimension 4 in cyclic group:

Supplier Payment tracking: 'On Time', '5 to 7 Days', '>7 Days'

Having above mentioned as scenario, I have used the below formula in expression background color,

if(([Supplier Payment Tracking]='On Time' or [Buyer Payment Tracking]='On Time' or [Shipment Document Tracking]='<5 Days' or [Lead Time Tracking]='<5 Days'), RGB(75,189,43)

,if(([Supplier Payment Tracking]='<7 Days' or [Buyer Payment Tracking]='<7 Days' or [Shipment Document Tracking]='5 to 7 Days' or [Lead Time Tracking]='5 to 7 Days'), RGB(254,187,48)

,if(([Supplier Payment Tracking]='>7 Days' or [Buyer Payment Tracking]='>7 Days' or [Shipment Document Tracking]='>7 Days' or [Lead Time Tracking]='>7 Days'), RGB(217,4,4))))

Now the issue is, I am not getting the desired color I want.

Could anyone please advise me on this?

Thanks & Regards,

Karthikeyan.

1 Solution

Accepted Solutions
sunny_talwar

If this works, then I suggest doing your if Statement a little differently:

If(GetCurrentField(GroupName) = 'Shipment Document Tracking',

If([Shipment Document Tracking]='<5 Days', RGB(75,189,43), If([Shipment Document Tracking]='5 to 7 Days', RGB(254,187,48), If([Shipment Document Tracking]='>7 Days', RGB(217,4,4)))),

If(GetCurrentField(GroupName) = 'Supplier Payment Tracking',

If([Supplier Payment Tracking]='On Time', RGB(75,189,43), If([Supplier Payment Tracking]='<7 Days', RGB(254,187,48), If([Supplier Payment Tracking]='>7 Days', RGB(217,4,4)))),

If(GetCurrentField(GroupName) = 'Buyer Payment Tracking',

If([Buyer Payment Tracking]='On Time', RGB(75,189,43), If([Buyer Payment Tracking]='<7 Days', RGB(254,187,48), If([Buyer Payment Tracking]='>7 Days', RGB(217,4,4)))),

If(GetCurrentField(GroupName) = 'Lead Time Tracking',

If([Lead Time Tracking]='<5 Days', RGB(75,189,43), If([Lead Time Tracking]='5 to 7 Days', RGB(254,187,48), If([Lead Time Tracking]='>7 Days', RGB(217,4,4))))))))

Please ignore any unintentional errors and fix them for your requirement

HTH

Best,

Sunny

View solution in original post

12 Replies
sunny_talwar

Can you convert you bar chart into a straight table and share a screenshot?

karthikeyan1504
Creator III
Creator III
Author

Hi Sunny,

As requested,

Capture.PNG

jsingh71
Partner - Specialist
Partner - Specialist

Can you share some sample data so we will try to implement the same.

sunny_talwar

Keeping it on Shipment Document Tracking, can you try this:

if(([Shipment Document Tracking]='<5 Days'), RGB(75,189,43)

,if(([Shipment Document Tracking]='5 to 7 Days'), RGB(254,187,48)

,if(([Shipment Document Tracking]='>7 Days'), RGB(217,4,4))))

karthikeyan1504
Creator III
Creator III
Author

Yes. I have tried it already...

When I keep only 'Shipment Document Tracking', it is working fine...

But it's not working for all the dimensions in cyclic group.

sunny_talwar

If this works, then I suggest doing your if Statement a little differently:

If(GetCurrentField(GroupName) = 'Shipment Document Tracking',

If([Shipment Document Tracking]='<5 Days', RGB(75,189,43), If([Shipment Document Tracking]='5 to 7 Days', RGB(254,187,48), If([Shipment Document Tracking]='>7 Days', RGB(217,4,4)))),

If(GetCurrentField(GroupName) = 'Supplier Payment Tracking',

If([Supplier Payment Tracking]='On Time', RGB(75,189,43), If([Supplier Payment Tracking]='<7 Days', RGB(254,187,48), If([Supplier Payment Tracking]='>7 Days', RGB(217,4,4)))),

If(GetCurrentField(GroupName) = 'Buyer Payment Tracking',

If([Buyer Payment Tracking]='On Time', RGB(75,189,43), If([Buyer Payment Tracking]='<7 Days', RGB(254,187,48), If([Buyer Payment Tracking]='>7 Days', RGB(217,4,4)))),

If(GetCurrentField(GroupName) = 'Lead Time Tracking',

If([Lead Time Tracking]='<5 Days', RGB(75,189,43), If([Lead Time Tracking]='5 to 7 Days', RGB(254,187,48), If([Lead Time Tracking]='>7 Days', RGB(217,4,4))))))))

Please ignore any unintentional errors and fix them for your requirement

HTH

Best,

Sunny

karthikeyan1504
Creator III
Creator III
Author

Hi Jsingh,

As requested,

   

Origin CountryShipment Document Tracking# of Lots
CAMBODIA<5 Days21
CAMBODIA5 to 7 Days50
CAMBODIA>7 Days2,911
CHINA<5 Days1,044
CHINA5 to 7 Days2,251
CHINA>7 Days2,158
INDIA>7 Days4
INDONESIA<5 Days3,284
INDONESIA5 to 7 Days1,876
INDONESIA>7 Days1,381
MALAYSIA<5 Days692
MALAYSIA5 to 7 Days959
MALAYSIA>7 Days781
MYANMAR<5 Days36
MYANMAR5 to 7 Days94
MYANMAR>7 Days209
VIETNAM<5 Days147
VIETNAM5 to 7 Days484
VIETNAM>7 Days662

   

Origin CountryBuyer Payment Tracking# of Lots
CAMBODIAOn Time46
CHINAOn Time203
INDONESIAOn Time31
INDONESIA<7 Days4
MALAYSIAOn Time9
MALAYSIA>7 Days3
MYANMAROn Time28
VIETNAMOn Time39

Thanks & Regards,

Karthikeyan.

karthikeyan1504
Creator III
Creator III
Author

Hi Sunny,

How can we mention the group name instead field name like GetCurrentField(GroupName) ?

Thanks & Regards,

Karthikeyan A R.

sunny_talwar

What is the cycle group called which includes your four fields -> Buyer Payment Tracking, Shipment Document Tracking, Supplier Payment Tracking and Lead Time Tracking?

For example the Group name is called Tracking

You can then find out which dimension you are on using GetCurrentField() function. Lets say you are on Buyer Payment Tracking then GetCurrentField(Tracking) in a text box will give you Buyer Payment Tracking and as you cycle through, this value will change.

HTH

Best,

Sunny