Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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.
If you have spaces in your Group name Like Group Name, then use the group name with square brackets -> GetCurrentField([Group Name])
Hurray!!!!
I was not aware that we can mention the group name in Getcurrentfield() function, since it shows error in expression.
It worked perfectly... Thank you for your quick response with care Sunny...
Warm Regards,
Karthikeyan.
Yes, it shows syntax error, but it works. A work around seeing a error in your expression is to create a variable (vGroupName = GetCurrentField([Group Name]) and then use the variable in your expression
If($(vGroupName) = '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($(vGroupName) = '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($(vGroupName) = '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($(vGroupName) = '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))))))))