Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Excell and Expressions

Hi guys,

I am relatively new to Qlickview and I have some difficulties with the scritping and barchart bits. I have uploaded and excel file containing some tables and fields containing data.One of these tables is called Branches and another one is called Products. The Product table contains two values. "Existing" and "New". Those values are mapped with arround 20 branches from the Branches table.

Now I am trying to make a Stacked Bar  chart in Qlickview where Branches table will be the dimension of the chart and the  Products the Expression. What i am trying to show is the persentage of the existing and new products within each branch and the difference between those those two. I understand that i need to compare values "new" and "existing" but both values are in one table and i can't really split them in excel, therefore I need to make a conditional Expression that picks the values individually and stackes them in one bar or make two expressions. One containing the New product info and the other one containing the Existing product info.I have attacghed an image as an example from Excel.

Could someone guide me step by step of how to do that?

Thanks in advance

example.JPG

19 Replies
Anonymous
Not applicable
Author

You have a mixture of 'new' and 'New'.  Qlikview is very case sensitive

Anonymous
Not applicable
Author

Did try just now. Still nothing. There are No errors shown at all but the graph is blank as it was before. It sounds and looks so simple and yet a pain in the....

Roop
Specialist
Specialist

You can see that Product_Type is underlined ..... I would select Product_Type and then select Product Type from the list bar. I think that it probably should be [Product Type] but I don't know what your structure is.

Generally, it will only work when the Expression is OK, and there is no message to state "Error in Expression".

Anonymous
Not applicable
Author

I did all the changes, the script looks ok. I did even change the Total count for Sum. No luck. It is still saying Error in Expression but without highliting anything

Actually there is an error message if the script is wrong. The error usually is under the menu File Edit, Menu

Anonymous
Not applicable
Author

I was wondering if I have to define elsewhere again what "New" & "Existing" is.

Roop
Specialist
Specialist

OK, I think I know the solution:

The problem is that I missed a "}" from the end of the Set Analysis

So the ending should be  "= > } Branches )" instead of "=> Branches )"

Roop
Specialist
Specialist

editexpression.png

Anonymous
Not applicable
Author

Thanks. That did work fine and i h

ave an initial chart now as shown in the picture below. The only thing left now is to add a 3rd expression named fitment.(I ll try to work this out on my own )

My last question to you is: How can i make the dimension values at the bottom of the graph to have a number next to them?. (because every bar of "new" & "existing" is associated to a number of branches). I just wanna have the number of branches associated  underneath each bar. Before i had a =Count ([Branches]) and that would show me the number but not now.

Thanks in advance and thank you all for helping me out with my previous questions.
Capture5.JPG

Roop
Specialist
Specialist

Romanos,

You can put "Text on Axis" or "Values on Data Points" both of which are check boxes under expressions tab. This will unfortunately only show the percentage values that you created in the expressions.

I think that a work around is to put a small table directly underneath the chart with the count of both Old and New. Sorry, not a very elegant solution!

Hope this helps

Anonymous
Not applicable
Author

Again i was thinking to get a conditional dimension but it didn't work....

I did use the "Values on Data Points" for the expression data already and it's fine... Well if that's the case with the dimension, then I guess there is no other way other than use the table you suggested.

Thanks again for your help and your patience