Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
AbhijitBansode
Specialist
Specialist

Apply same text color for all the records of same customer in straight table

My final view of table sholud be like this:

CUSTORDERCUST_AMNT
C1O110
C2O220
C3O330
C1O440
C1O550
C2O610
C4O720
10 Replies
nirav_bhimani
Partner - Specialist
Partner - Specialist

Hi,

try this

=If(CUST= 'C1', RGB(255, 0,0 ), RGB(0, 0, 0,))

Regards,

Nirav Bhimani

AbhijitBansode
Specialist
Specialist
Author

I have shown sample data in example.

I can not hardcord the value of Customer since there are thousands of customer.

Not applicable

Hi,

Technical you could get a hash value for the Id or name an try to convert that to an rgb code,

but with thousands of customers, how will you distinguish between thousands of colors?

Ciao

Klaus

Not applicable

Hi All,

I have an idea!!!, but im not sure it will work in Qlikview.

Create a one new table(customer_color_map) with customer name and color code, then join with customer table with customer_color_map table, then we can use color column.........

--Prabhu Ch

Not applicable

Generally, i always use above logic for customized sorting purpose in sql queries......

Not applicable

Hi Frnds,

i got it..........

I have added on Dimension->Used Dimension->BackGround Color->Edit

=Color.CUST

Before this, you have to create new table Color with Customer and Color code

C1, 25

C2, 90

C3, 150

C4, 236

then you have to join with Customer table using Customer Column from both tables.

--Prabhu Ch

AbhijitBansode
Specialist
Specialist
Author

Thnks for your time.

But the thing is, i can not have a temporay table for customer.

since millions of customer are present in table.

Not applicable

Sparten,

If you have Millions of customers, then can you plan to assign unique color to every Customer.

I think for above example given by, you can create Color table with Customer Name and color ID. then you can join with Customer table, even though you don't have Customer table you can join with the table, that contains Customer details.

--Prabhu Ch

prasad_dumbre
Partner - Creator
Partner - Creator

Hi Sparten B,

I think the solution given by Mr. Prabhu Ch is the only way. But I think you dont want to add value(color value) in front of each customerID manually. So, You can apply some incremental loop which will keep on assigning numerical values to each new ID.
In this way u will have unique numbers for each customer, using which you can assign unique colors. . .