Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Need help
I am trying create field/expression to get overall Status Color for item based on Stage. If any stage has black color get color from previous stage as Overall color for that item.So For C Overall status color should be Amber as Stage Status for 3&4 are Black and For item B Overall Status color should be Green as Stage Status is Black fro Stage 4 is black.
Even easier. Remove the if statement and the last branch:
FirstSortedValue({<[Stage Status]-={'Black'}>}total <Item> Color, -Stage)
See attached example.
Didn't know RGB worked in the script to create a color field. Thanks for this Gysbert
RGB() is just a 'convenience' function to create a big number. A number that happens to be something that can be used to tell the software to render something in a certain color.
Thanks for reply Gysbert. Your background color expression works great if I want to show stage color of previous stage if it current stage is black .But I am looking for something like below.Overall Stage Status color should be latest Stage Color if it not black.For example item A has yellow for last stage 4 so overall Color for Stage should be yellow .For item B Stage 4 is black so go to previous Stage which is 3 and its color is green so overall color of stage should be Green.
thanks for your help
Even easier. Remove the if statement and the last branch:
FirstSortedValue({<[Stage Status]-={'Black'}>}total <Item> Color, -Stage)
I was about to reply that it worked if I remove If condition. .And you go it right .Many thanks Gysbert.
Hey Gysbert.Will it work only on expression not on dimensions?When I applied same logic to large data set it is not working .It does not work with FirstSortedValue({<[Stage Status]-={'Black'}>}total <Item> Color, -Stage) but it works with if([Stage Status]='Black',FirstSortedValue({<[Stage Status]-={'Black'}>}total <Item> Color, -Stage),Color) but the other way like below