Qlik Community

Qlik Sense App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

Announcements
QlikWorld 2020: Join us May 11 - 14, 2020 in Phoenix, AZ. Register early and save $400. Learn More
dotnetfan
New Contributor II

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

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

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), ....

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)