Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Group data on a bar chart to create an 'Others' category

HI all.

I'm a newbie on the Qlikview World, so I really need your help

I've been looking on the forums and I can't found an exact answer to my problem.

I have a bar chart and a dimension called "Values". When I selected items from "Values", they appears on the chart. My problem is that besides the selected data I need to add a new one called 'Others', that contains the summatory of the non selected data.

I found that expression

if(dimensionality(),sum({<product =e(product)>}sale),sum(sale))

With this, the selected values are not shown on the chart, only the non selected (great, I need this), but I don't know how to combine to obtain the selected data and the 'Others' in the same chart

Thanks a lot

15 Replies
Not applicable
Author

Thanks Jason, on the chart the values of the category are shown separately. But trying to create the chart, all those categories that were selected (distinct to 'Others'), the expression calculate the total value of the selection for each bar, instead de individual quantities.

Jason_Michaelides
Luminary Alumni
Luminary Alumni

Ah. Oops. Will take a look later.

sridhar240784
Creator III
Creator III

Hi,

Your expression shoule be as shownbelow.

Dimension Expression:

=if(WildMatch(TEST,$(=Chr(39)&Concat({<TEST= e(TEST)>} TEST,chr(39)&','&chr(39))&Chr(39))),'Others',TEST)

Value Expression:

=Sum (Value)+SUM({<TEST =e(TEST)>} Value)

Have a look at the attached application.

Hope this may help you.

-Sridhar

Not applicable
Author

Thanks for your answer

I tried the last approach, that means, I only replaced the dimension and the expression with your suggestion, but it didn't work.

I realised that the 'characteristic_value' variable don't appear on your expressions. Should it be specified elsewhere in the apllication?

I have the personal edition of qlikview, so I can't open your file

Bye

Jason_Michaelides
Luminary Alumni
Luminary Alumni

Sorry for the delayed answer mate - I had my expression slightly wrong.  Instead of:

if($(vValueList) = 'Others',

sum({<characteristic_value=E()>} fact_sold_units),

sum(fact_sold_units)

)

you need:

if($(vValueList) = 'Others',

sum({<characteristic_value=E()>} fact_sold_units),

sum(IF(characteristic_value=$(vValueList),fact_sold_units))

)

See attached,hope it helps,

Jason

Not applicable
Author

Great, The last answer works perfectly

Thanks a lot for all your support !!!