9 Replies Latest reply: Aug 4, 2011 6:43 AM by At titude

# 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

• ###### Line chart help!

Hey Hi,

You can make the chart with Dimension : Week

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

Hope this helps...

Regards

• ###### Line chart help!

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.

Regards

Attitude

• ###### Line chart help!

Hi,

Use this:

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

Hope this helps...

Regards

• ###### Line chart help!

Hi Rahul

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

Regards

Attitude

• ###### Re: Line chart help!

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

• ###### Line chart help!

"Sum(total <ProductCategory>Sales)".

• ###### Line chart help!

Hi Miguel and Sunil

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

• ###### Re: Line chart help!

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

• ###### Line chart help!

Hi Miguel

Thanks for your explanation. That makes sense!

Regards

Attitude