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: 
poooja
Creator
Creator

How to show the data on a bar chart

Hi Qliks,

I am trying to show the Quaterly and 3 months of data in one bar chart when selecting a specific Quater (example: Q1 and display Jan,Feb,March and Q1 data). Any help for the logic would be appreciated.Bar.jpg

1 Solution

Accepted Solutions
poooja
Creator
Creator
Author

Thanks.  I got the solution. Can i know what concept is Dim.

Thanks!

Pooja

View solution in original post

9 Replies
uacg0009
Partner - Specialist
Partner - Specialist

Hi,
It can be done in many ways, but the method should be based on your data model,
so could you please share a small sample about your data model or qvw?
then I can find a way to solve this.
Thanks.
Aiolos Zhao
poooja
Creator
Creator
Author

Hi,

 

Please find the attached source data and QVW.

 

Thanks

Pooja

poooja
Creator
Creator
Author

Hi,

 

My source file here.

Thanks!
Pooja

uacg0009
Partner - Specialist
Partner - Specialist

Hi,

I think below is what you want:

How to show the data on a bar chart2.PNGHow to show the data on a bar chart1.PNG

Aiolos Zhao

poooja
Creator
Creator
Author

Thanks.  I got the solution. Can i know what concept is Dim.

Thanks!

Pooja

anushree1
Specialist II
Specialist II

Hi,

I was looking at the solution offered here and have been wondering on the usage of Pick Function here , Pick is taking the value of Dim to choose the Dimension YearMonth or Year Quarter but in this case Dim does not have any value selected which evaluates to Null but still the Pick variant seem to give the desired result.

So could you kindly explain how this is been achieved?

sonysree88
Creator II
Creator II

Hi Team,

I am using personal edition of qlikview, i am unable to open the QVW file which you have shared.

Can you please explain little bit more to achieve this scenario.

How both will come in 1 bar chart.

Regards,

Sonysree

uacg0009
Partner - Specialist
Partner - Specialist

Hi,

Well, actually I learnt this method for another expert, when I saw the method he used, I think that's really cool.

It uses the Cartesian Product, the value of Dim only have 1 and 2.

You can pull out a table box including Dim column and Month column and Quarter column.

Then you can see the Cartesian Product for these 3 columns,

And using Pick() function, it can show both month and quarter.

Pick(parameter,exp1,exp2,exp3) -  to calculate the expression based on the first parameter value, 

eg: parameter = 1, show exp1

parameter = 2, show exp2

So when Dim = 1, show month, when Dim = 2, show quarter

Hope I have clarified the solution

Aiolos Zhao

anushree1
Specialist II
Specialist II

Thanks for taking time and explaining the methodology here, I still have a Question, could you please be kind and reply to it as well:

1. why are we concatenating YearQuarter with Space like YearQuarter&' ' , in the calculated dimension.