Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
LINKEDIN LIVE: Democratizing data to enhance customer-centricity. JULY 29TH REGISTER TODAY
cancel
Showing results for 
Search instead for 
Did you mean: 
pranaview
Creator III
Creator III

Ignored filter through set analysis still impacting the color of bars in the chart

Hi Guys,

I have a filter that i have to use specifically just for one chart in the sheet, so i am ignoring it by using Field= in the set expression of other charts but i have a bar chart with one dimension and two values i.e two bars and i have to show each bar with a different color. but when i am using that filter, although it doesn't change any values in the bar chart but it does change the color to default i.e either else part in the color exp or if i don't use the color exp then the first color from the colors tab.

I am not sure why that filter is at all interacting or impacting that chart. Do i need to alter my background color exp? any suggestion will help.

Thanks!

1 Solution

Accepted Solutions
sunny_talwar

Try this for color expression

Only({1} If(Field = 'A', Col1,Col2))

 

View solution in original post

7 Replies
Brett_Bleess
Support (Former)
Support (Former)

Likely will be most helpful if you can attach a sample QVW file, so folks can dig into things a bit more deeply, not sure anyone can help much without more information.

Regards,
Brett

To help users find verified answers, please do not forget to use the "Accept as Solution" button on any post(s) that helped you resolve your problem or question.
I now work a compressed schedule, Tuesday, Wednesday and Thursday, so those will be the days I will reply to any follow-up posts.
sunny_talwar

What is your color expression? You might need to ignore selection in Field in that color expression also.

pranaview
Creator III
Creator III
Author

Hi Sunny,

It's a pretty simple chart with one dimension and an expression. I just have two values in the dimension and hence two bars, one bar has to be in one color and the second one in a different one. 

Color expression: If(Field = 'A', Col1,Col2)

The user doesn't want two filters to have any impact on this chart so i have ignored them in my set expression. but whenever i uses those filters, both bars takes up Col2 (else part of the condition).

How can i ignore those two field selection in the color exp?

This is actually just one example, i have other charts with more dimension and same issue but i think if it can be resolved for this simple scenario, it should be easy to fix for others.

Thanks for the help!

sunny_talwar

Try this for color expression

Only({1} If(Field = 'A', Col1,Col2))

 

View solution in original post

pranaview
Creator III
Creator III
Author

Hi Sunny,

Thanks a lot! That worked like a charm. Good use of the Only() function.

I have another separate query that i have already asked in the community but haven't got an answer so i'll just ask it here. Do you know how can we keep the X-axis scroll bar to the right by default, user is hellbent on this for trend charts on the app. 

I have tried reversed and preserve scroll position check boxes and macro to set it to right as well but nothing really worked, the scroll bar either comes in at the left or somewhere in the middle. So i thought maybe you have any idea on this so i might as well ask here.

Thanks for the help!

sunny_talwar

not really sure I have answer for this.

Brett_Bleess
Support (Former)
Support (Former)

For that one I would recommend hitting the IDEA area of Community, as I do not believe it is currently possible, so check to see if someone has already submitted that request, if not, you can certainly add that one, cannot say whether it will get accepted, but if it gets enough votes, it might.

https://community.qlik.com/t5/Ideas/idb-p/qlik-ideas

Regards,
Brett

To help users find verified answers, please do not forget to use the "Accept as Solution" button on any post(s) that helped you resolve your problem or question.
I now work a compressed schedule, Tuesday, Wednesday and Thursday, so those will be the days I will reply to any follow-up posts.