Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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
Hey Hi,
You can make the chart with Dimension : Week
and Expression : Sum({<ProductCategory={'*'}>} Sales)
Hope this helps...
Regards
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
Hi,
Use this:
Sum({<ProductCategory={'*'}-{'ABC'}>} Sales)
Hope this helps...
Regards
Hi Rahul
Exactly just now I got that. I was supposed to reply you back. Many thanks for your help!
Regards
Attitude
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
BI Consultant
please try this
"Sum(total <ProductCategory>Sales)".
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
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.
BI Consultant
Hi Miguel
Thanks for your explanation. That makes sense!
Regards
Attitude