Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Legend Properties??

How to change the properties of legend on a bar chart/scatter chart?

I am using a bar chart and I am representing two bars(each corresponding to a year : 2011, 2012). And under each bar I have two sections (one color for each). In the legend I get 4 options (2 green and 2 gray), but I just want 2 optionsin the legend (1 green and 1 gray).

How do I fix that?

Please find the attachment for the qvw file

1 Solution

Accepted Solutions
MayilVahanan

Hi,

Try this,

     =Num(Sales,'#,##0')

     For example

      =Num(2468264,'#,##0') gives 2,468,264

Hope it helps

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.

View solution in original post

22 Replies
MayilVahanan

Hi,

     In this you are using four expression , so the four legend will appear.. It can't be reduce..

     You can use like this,

     Change the script as

     Load * if(line_no = 1 or line_no =2 , line_no) as line_no1 from filename;

     and use

     line_no1 and year_no as dimension and use sum(sales_2012) like that.

    ( or) attach your xls file also. And your requirement .

Hope it helps.

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
Not applicable
Author

Can you make the changes in the qvw ?

I have access to licensed version for sometime now??

Not applicable
Author

Here is a sample excel, I have changed it but the column names are the same. So you can use it

Not applicable
Author

Here is my requirement,

I have to represent the sales for the years 2011 and 2012.

So, tI have used year as the dimension.

And I have used sum(sales) as the expression.

Now for each year , I need to represent promoted slaes and non-promoted sales. So , that is why I have used two expressions. for each year: line_no = 1 represents sales on promotion

line_2 = non promoted sales

Is that clear?

Not applicable
Author

I have updated the xls ..it has rows with line_no = 1and line_no = 2.

I hope the requirement is clear. Please let me know if u need more info

MayilVahanan

Hi,

     For your requirement, you can use 2 dimension and 2 expression as above post.. or use urs or use below post by using cyclic . you can reduce into 2 expression and one dimension..May be it helps..Did you try it..Can i know it what the result?

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
Not applicable
Author

Thanks Mayil,

Though the solution you gave did not help me, your suggestion helped.

MayilVahanan

Sorry uday shankar.. i don't know how to achieve this..When you achieve  your requirement, can you post it..i will increase my knowledge..In my point of view, i tried my best..

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
Not applicable
Author

As you said, I changed the number of expressions. I used two instead of four expression. I think there was a problem with the data set, so I changed the query which fetched the data set .

In the data set i shared, I was grouping data two times, there was a year column and there was also sales 2011 and sales2012. I got rid of two columns and now I have one column sales and I have a column year(which is my dimnsion and takes care of sales 2011 and sales 2012).

I hope I was clear