Skip to main content
Announcements
See why Qlik is a Leader in the 2024 Gartner® Magic Quadrant™ for Analytics & BI Platforms. Download Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

barchart

Hi all

i wanted to show the bar chart as below

here selected bars are showing as blue non selected bars are showing as Gray

Is it possible

bar.PNG.png 

1 Solution

Accepted Solutions
MK_QSL
MVP
MVP

Please check enclosed file..

View solution in original post

8 Replies
Not applicable
Author

In QlikView , if u are selecting particular bars then it will display those much of bars only.

It will not display other bars as gray.

Correct me if my understanding is wrong.

linusblomberg
Creator II
Creator II

Yes it is possible. I don't have my example right now but you can enter the color under background color when you expand the expression. Use an if-case, if(expression, red(),gray())

Hope this helps

MK_QSL
MVP
MVP

Please check enclosed file..

Not applicable
Author

Hi Manish Kahhia,

Thank for your reply

could you please explain the bellow expressions

SUM({1}Sales)

IF(Match(Customer,Only({A} Customer)),BLUE(),RGB(179,179,179))

arjunkrishnan
Partner - Creator II
Partner - Creator II

Hai Reddy ,

Try This One on You Background Color in Expression It Working Fine

=IF(MonthYear=Only(MonthYear),Blue(),RGB(179,179,179))

Not applicable
Author

if i am nothing is selected in the customer field but the chart will show like all the fields are selected  .. is it wright...

MK_QSL
MVP
MVP

Here A is an Alternate State...

But obviously you can use the same without alternate state.

SUM({1}Sales) This will give you total sale by Customer/Year and even though you select any year or customer, your all bar will be visible because {1} is freezing all bars...

Try SUM(Sales) and SUM({1}Sales) with two different bar chart and select any customer, you will realize what is happening.

IF(Match(Customer,Only({A} Customer)),BLUE(),RGB(179,179,179))

or

IF(Match(Customer,Only(Customer)),BLUE(),RGB(179,179,179))


Here

Match(Customer, Only(Customer) is matching 1st Parameter Customer with 2nd parameter Only(Customer)

If Match is successful IF will execute the BLUE() and not successful RGB(179,179,179)..


Hope this helps...

linusblomberg
Creator II
Creator II

Some of the examples here are a little more complicated than they need to be. I personally prefer Arjun Krish example. If you want more than one month to be highlighted I would use a min and max date variable (I always define the min and max-date variable)

if(YearMonth>=$(vMinYearMonth) and YearMonth<=$(vMaxYearMonth),red())