Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Qlikers
I have Straight table in my dashboard and wants something like below:
each GroupId has specific Color .the count of groupId is about 50000
i did it by formula :
if(even(aggr(distinct row(),GroupId )),gray(),white())
or
=if(Mod(aggr(NODISTINCT rowno(),GroupID),9)=0,RGB(0,0,0),
if(Mod(aggr(NODISTINCT rowno(),GroupID),9)=1,RGB(30,30,30),
If(Mod(aggr(NODISTINCT rowno(),GroupID),9)=2,RGB(60,60,60),
if(Mod(aggr(NODISTINCT rowno(),GroupID),9)=3,RGB(90,90,90),
If(Mod(aggr(NODISTINCT rowno(),GroupID),9)=4,RGB(120,120,120),
if(Mod(aggr(NODISTINCT rowno(),GroupID),9)=5,RGB(150,150,150),
if(Mod(aggr(NODISTINCT rowno(),GroupID),9)=7,RGB(180,180,180),
if(Mod(aggr(NODISTINCT rowno(),GroupID),9)=8,RGB(210,210,210),RGB(240,240,240)
))))))))
but when I sort Table by Amount Column maybe tow same color with different groupId be side each other
what should i do to have table like below:
Appreciate for answers
So basically if your expectation is just to get the same bgcolor for similar groups then sorting will definitely seperate the rows. How do you want it to be displayed??
Hi Samane,
You can use below eample.
Store the color codes in table/excel instead of writing complex expression.
PFA Solution and let me know for more information.
Regards,
Pankaj
I have more than 50,000 groupId and can't set distinct rgb() for them
I want each groupId has it's own color even in seprate form
for example i have four groupId those are '7' with perple color
So, you mean there are 50000 record each with different color?
more than 50,000 distinct groupId and each groupId maybe have more than one record
in my sample u can see groupId & have 4 record
In your expression i think till group ID 8 there are fix set of colors and then RGB(240,240,240) for other groupid's.
Is this what you require?
Hi Samane, you can try with:
Mod(FieldIndex('GroupID',GroupID),9)
It will return a number based on the value of the field, not the position on the table.