Forum Discussion
visualization
hello! i have a table that has 2 colums the first is years from 2012 to 2017 and the second in about two products i need to create a graph that will allow me to show for each year which were the sales for each product, im been trying to use the clustered columb chart but the problem is that it shows me the total of the sales of the products in all of the years not the total of each product per year.
hope you can help me
Hey,
sorry for the late response, but as far I understand your requirement this might be solve your requirement without any DAX magic involved :-)
Here is a screenshot of a very simplistic datamodel, just containing two columns, year and product
I put the year column to the Axis pane (from the format of the xaxis i set the type to categorical), put the product to the legend pane and also ont the value pane (due to the text datatype of the column the aggregation COUNT is chosen).
You might wonder about the numbers that are shown in chart, this is simply due to the fact of the underlying base table shown here
Hopefully this is what you are looking for, from my point of understanding, there is no need to work with Quick measures for this requirement
Regards
Tom
13 Replies
- TomMartensSuper User
Hey,
give the infographic desiger from the marketplace a try:
Here is a screenshot:
I also changed the type to bar:
But maybe the default bar chart will also work
using the format option
Hopefully this gives you some ideas
Regards
Tom
- anaorca1990Helper I
hi Tom, thanks for you reply the problem is that only have two colums one with the year and the other with kind of th product, im attaching a pic, sorry is in spanish.
the first row is the years and the other one that is highlight is the product
i manage to find a solution using a quick measure but i want to know if there is an easier way. what it does is that it counts how many items were sold by category per year
hope im clear, thank you for your help
- anaorca1990Helper I
hi Tom, thanks for you reply the problem is that only have two colums one with the year and the other with kind of th product, im attaching a pic, sorry is in spanish.
the first row is the years and the other one that is highlight is the product
i manage to find a solution using a quick measure but i want to know if there is an easier way. what it does is that it counts how many items were sold by category per year
hope im clear, thank you for your help
- lisaeugeneFrequent Visitor
How about a stacked bar chart showing a bar for each year, segmented by product sales? To do that you need to choose that chart from your visualizations board. The fields you can use to come up with the sample one below are:
- 'Table'[Year] in Axis
- 'Table'[Products] in Legend
- 'Table'[SalesAmt] in Value.
You mentioned that you have only two columns in your table, but for my example here you need three. Sounds like you have the first two columns I mentioned, but need to have the sales amounts for the products in a third column in order to produce this kind of visualization.
Hope this helps!
- anaorca1990Helper I
hello
i have a problem cause they are only in two rows so this wont work, but thank you for help
- TomMartensSuper UserHey,
actually I have no idea what you are trying to achieve.
Given your table there is a year column, put this to the axis of the clustered column chart.
There is a product column, put this to the legend pane of your chart.
Put the numeric sales column to the value pane, it will automatically be summed.
Done.
Why does this not work for you?
Maybe you can scribble a chart (based on easily identifyable data) and just provide the image
Regards
Tom
- v-piga-msftResident Rockstar
Hi anaorca1990,
Have you solved your problem with the solutions provided by lisaeugene and TomMartens?
If you have solved your problem, Please always accept the replies making sense as solution to your question so that people who may have the same question can get the solution directly.
If you still need help, please share some data sample and expected output, so that we can help further investigate on it?
Best regards,
Cherry