Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
In an expression color code field that chooses a color from a table, I want to pick the color value that corresponds with the latest record.
I was thinking I need to use set analysis, but don't really need aggregation. I tried using max, avg, etc with this set:
max({$<ReportDate={"$(=max(ReportDate))"}>}[Multi Bunk Status Color])
I think the problem is that RGB values (strings) can't be aggregated. Here's what's loaded into [Multi Bunk Status Color]...
[Multi Bunk Status Table]:
load * Inline
["Multi Bunk Status","Multi Bunk Status Color"
'1VACANT','RGB(153,255,51)'
'2VACANT','RGB(255,255,51)'
'4VACANT','RGB(255,0,0)'
'1FILLED','RGB(76,153,0)'
'2FILLED','RGB(153,153,0)'
'4FILLED','rgb(153,0,0)'
];
Thanks.
Did you tried with Only
Only(Distinct {$<ReportDate={"$(=max(ReportDate))"}>}[Multi Bunk Status Color])
Did you tried with Only
Only(Distinct {$<ReportDate={"$(=max(ReportDate))"}>}[Multi Bunk Status Color])
Only is the only function I needed. Thanks.