Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Line chart help!

Hi All

I have a week as first dimension and product category as second dimension in a line chart. I am using formula "Sum(Sales)". So this line chart gives product category wise week wise. So what I would to do is I would like to show only one line the line chart which gives over all sales of all the product category. I don't want to show seperate line for each product category.

I short what I need is one line which gives consolidated sales of all the product week wise.

Hope my requirement is understandable. If not please let me know.

Regards

Attitude

9 Replies
rahulgupta
Partner - Creator III
Partner - Creator III

Hey Hi,

You can make the chart with Dimension : Week

and Expression : Sum({<ProductCategory={'*'}>} Sales)

Hope this helps...

Regards    

Not applicable
Author

Hi Rahul

Thanks! Thats good idea. May I know how can I calculate the sales for all the ProductCategory except 'ABC' product category. What would be the change in it? I modified the set analysis but it didn't work out.

Please help me out when you have free time.

Regards

Attitude

rahulgupta
Partner - Creator III
Partner - Creator III

Hi,

Use this:

Sum({<ProductCategory={'*'}-{'ABC'}>} Sales)

Hope this helps...

Regards

Not applicable
Author

Hi Rahul

Exactly just now I got that. I was supposed to reply you back. Many thanks for your help!

Regards

Attitude

Miguel_Angel_Baeyens

Just for the record, you can use the "-=" operator as well (although the editor underlines in red, that works and so it's documented)

Sum({< ProductCategory -= {'ABC'} >} Sales)

It's more useful when you have several values and should return the same as the one aptly suggested by Rahul.

Regards

Miguel Angel Baeyens

BI Consultant

Comex Grupo Ibérica

SunilChauhan
Champion
Champion

please try this

"Sum(total <ProductCategory>Sales)".

Sunil Chauhan
Not applicable
Author

Hi Miguel and Sunil

Thanks for your help!

Miguel: Your solution gave the same result which I was looking for. May I know which one better to use performance wise? Also may I know why?

Sunil: Sorry! It is giving incorrect result.Thanks for your suggestion.

Thanks

Attitude

Miguel_Angel_Baeyens

Hi,

I always use the "-=" operator when it comes to not to take into account some values in a field, and it's likely the one will perform better. But as usual, try all the different options by yourself, because performance doesn't depend only on expression, but your data model, your charts, the data volume you are handling... On the other hand I find this way cleaner, but this is my view.

Hope that helps.

Miguel Angel Baeyens

BI Consultant

Comex Grupo Ibérica

Not applicable
Author

Hi Miguel

Thanks for your explanation. That makes sense!

Regards

Attitude