Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
When using color > By expression instead of Auto color at a bar chart or combo, none of pick(match(), if(), and variable set works.
pick(match(status,'approve','cancel'), yellow(), red())
if(status='approve', yellow(), if(status='cancel', red()))
pick(match(status,'approve','cancel'), $(vapprove), $(vcancel))
I set dimension and measure as below.
Count({$ <status={'approve'}>} station)
Count({$ <status={'cancel'}>} station)
and the data table is
test:
load ActionDate, if ( isnull(Project ),'Unknown', Project) as Project , Approval
Inline [ ActionDate, Project , Approval
2/4/2021, a , cancel
2/4/2021, b, approve
2/4/2021, c, approve
2/5/2021, b, cancel
2/5/2021, a, approve
2/5/2021,c,approve
2/8/2021, c, approve
2/10/2021, a, approve
2/10/2021, b, cancel
2/10/2021, c, approve
3/15/2021,a, approve
3/15/2021, c, cancel
3/16/2021, c, cancel
];
Hi,
1. Add each measure to the Master Items.
2. From the Master Items- select the color for each measure
The result: