Quantcast
Channel: Desktop topics
Viewing all articles
Browse latest Browse all 213819

Need to Display multiple values on x axis

$
0
0

I am creating a Line and Cluster column chart and on Y axis I am trying to show the relation between sales and units based on different mangers and years. For example if I have the below table showing the data as year, sales and Units.

 

Year     Sales     Units

2013    200        20

2012    300        30

2014    100        10

 

Now the thing with this graph is that I am using a custom filter for allowing the user to choose between sales and units so that he can see any one between sales and unit or both at a time. i am using the following code to display the value based on custom filter:

 

Display Quantity = if(contains('Show Data By','Show Data By'[Show Data],"Qty"), SUM(Sales[Quantity]), BLANK())

Display Revenue = if(contains('Show Data By','Show Data By'[Show Data],"Revenue"), SUM(Sales[Revenue]), BLANK())


Now I have one more table which has 2 columns Year and Manager.

 

Year   Manger

2012    abc

2012     xyz

2013    abc

2014    abc

2014    xyz

 

On the graph I want to show the sales and Units value for each manger on yearly basis. If I am using the above code it is giving the relation between Sales, Units and Manger but it is summing up the data for all years , i.e., for manger abc it is showing me 1 bar withs sales as 600 . What I want is not to sum up the data but show the data brake down on yearly basis, i.e, instead of showing 1 bar for abc manger for sales it should show 3 bars(2012 (200), 2013 (300) and 2014 (100)) for manger abc for sales.

 

Note: I do not want to use drill down in this case


Viewing all articles
Browse latest Browse all 213819

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>