Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I have created an inline table that includes a mapping between a certain type and a color.
The table looks like below:
load * inline [
Type,ColorMapping,
T,rgb(255,255,155)
A,rgb(255,155,255)
];
and I am trying to map the background color of the expression with the type of the field, but it does not seem to work.
My expression is
=Only
(
If(Type<>'N/A',
If(Left(Type,1)='H','H',Type))
)
and the calculated expression on the background color is =ColorMapping
Any ideas why??
Try this
load * inline [
Type,X,Y,Z
T, 255,255,155
A, 255,155,255
];
background color is =RGB(X,Y,Z)
Hey Nikos,
Hope this helps.
Thanks
AJ
Something like this loading your RGB values as string and using RGB (or ARGB) function to convert to a number
LOAD
proposta_status,
proposta_status_ordem,
rgb(SubField(proposta_status_cor,',',1),SubField(proposta_status_cor,',',2),SubField(proposta_status_cor,',',3)) as proposta_status_cor
INLINE [
proposta_status, proposta_status_ordem, proposta_status_cor
Novo, 1, "170,170,170"
Em Análise, 2, "255,153,0"
Proposta Enviada, 3, "204,255,255"
Em Negociação, 4, "255,255,0"
Ganho, 5, "153,204,0"
Perdido, 9, "255,0,0"
];
Try this
load * inline [
Type,X,Y,Z
T, 255,255,155
A, 255,155,255
];
background color is =RGB(X,Y,Z)
Hi Nikos, the comma (,) treated as delimiter in the INLINE table. so Please try like below:
LOAD ID , RGB(R,G,B) AS BG INLINE [
ID, R, G, B
1001, 10,35, 80
2001, 100, 255, 180
3001, 255, 135, 245
];