Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Need Help on bar charts

Hi All,

Myself Nani and i am new to qlikview.

I need a small help on barcharts.

I have 10 vales in countries field and i want to display only 5 specified countries in bar chart.How to do it?

Thanks In Advance.

Nani D

1 Solution

Accepted Solutions
its_anandrjs

Update now please check previous i forget to add some thing

If you have sample then provide might be easy

Suppose you have table like

Load * inline

[

Country,Sales

Germany,23434

USA,43242

Japan,45687

Greece,53454

India,4545

Dubai,677

Malaysia,7676

Russia,76765

Africa,2434

Switzerland,5453

Brazil,3546

];

Write a expression for bar chart like

Dimension:- Calculated dimension If( Match(Country,'USA','Germany','India','Spain','Greece'),Country)

and suppress when value null

Expression :- Count(Sales)

View solution in original post

8 Replies
its_anandrjs

Update now please check previous i forget to add some thing

If you have sample then provide might be easy

Suppose you have table like

Load * inline

[

Country,Sales

Germany,23434

USA,43242

Japan,45687

Greece,53454

India,4545

Dubai,677

Malaysia,7676

Russia,76765

Africa,2434

Switzerland,5453

Brazil,3546

];

Write a expression for bar chart like

Dimension:- Calculated dimension If( Match(Country,'USA','Germany','India','Spain','Greece'),Country)

and suppress when value null

Expression :- Count(Sales)

MK_QSL
MVP
MVP

You need to use below as

Calculated Dimension in Straight or Pivot Table

=IF(Match(Country,'Country1','Country2','Country3','Country4','Country5'),Country)

Tick Suppress When Value is NULL

You can use the same in your list box expression, if you want to display only 5 Countries in your List BOX

Here Country is the Dimension Name

Country1,Country2,Country3,Country4 and Country5 are the countries. You need to change them according to your requirements.,

Not applicable
Author

Hi Anand,

Thanks for your post.

I have uploaded two tables like this

Customer:

LOAD [Customer ID],

     Country,

     Customer,

     Address,

     City,

     Zip

FROM

(biff, embedded labels, table is [Sheet1$]);

Sales:

LOAD Month,

     [Salesman ID],

     [Customer ID],

     [Transaction ID],

     Year,

     Day,

     [Product ID],

     [Serial No],

     [List Price],

     Sales,

     [Gross Margin]

FROM

(ooxml, embedded labels, table is Sheet1);

I Have Country Dimention and expression is Sum(sales)

and i want to find out some of sales for only two countries.

Nani D


its_anandrjs

Update

Then write like expression like

I assume Country1,2.... you use your dimension country

Select 2 country name in the dimension

Dimension:- If( Match(Country,'Country1','Country2'),Country)

and suppress when value null

Expression :- Count(Sales)

With SET Analysis you can also do this

Dimension:- Country

Expression:-Sum( {<Country = {'Country1','Country2' }>}  Sales)

MK_QSL
MVP
MVP

You need to use below as

Calculated Dimension in Straight

=IF(Match(Country,'Country1','Country2'),Country)

Tick Suppress When Value is NULL

Expression

SUM(Sales)

Not applicable
Author

Hi Anand,

its working Thanks

Nani D

MK_QSL
MVP
MVP

Nani, Glad that you have got your answer.

Whenever more than one answers are right from more than one members, request to tick Correct Answer based on first come first serve basis (you can check time). Even though this is just my suggestion, final decision is on the member who has raised question.

This will make justice to the work done for giving answer and also, encourage members to answer.

If someone has given correct answer and will not receive any points (like what happened to myself), making oneself thinking what is gone wrong !!!

its_anandrjs

Thanks Nani to know it working enjoy qlikview.

Regards