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

Does it possible to fetch the sequence number for each line in line chart

Hello,

Does is possible to fetch the sequence number for all the lines in line chart?

 

Now I have a requirement to display 10 lines in line chart for top 10 customers based on ordered date. Here is the sample for only 2 customers.

 

Dimension: Ordered Date

Measure 1 expression: Count({<[Customer Id] = {'200165'}>}[Customer Id])

Measure 2 expression: Count({<[Customer Id] = {'200742'}>}[Customer Id])

clipboard_image_0.png

I would like to change the color based on customer id, I know it's possible to change the color by adding as master items but I would like to know does it possible to change the line color by using expression:

for example, If( Line# = 1 then RGB(0,0,0), Line# = 2 then RGB(255,255,255), ....

clipboard_image_1.png

Thanks,

Dotnetfan

1 Reply
Anil_Babu_Samineni

There are many options you can choose, For now try below 2 options

1) AutoNumber([Customer Id]) as Line# // In script

Color Expression :  If( Line# = 1 then RGB(0,0,0), Line# = 2 then RGB(255,255,255), ....

2) RowNo(TOTAL) // In measure

Color Expression :  If( RowNo(TOTAL)= 1 then RGB(0,0,0), RowNo(TOTAL) = 2 then RGB(255,255,255), ....

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful