The ultimate Microsoft Fabric, Power BI, Azure AI, and SQL learning event: Join us in Stockholm, September 24-27, 2024.
Save €200 with code MSCUST on top of early bird pricing!
Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
I'm a bit stuck, with something that feels should be quite simple - so I hope somebody can help me with this.
Basically I've got a table with sales data statistics:
ProductId, SalesDate and GrossSalesValue
This table holds data for a few years and I need to present side by side performance this year vs last year.
In Excel creating such a chart is very simple (see screenshot at the end of this post). I see that it takes two columns - one for 2016. year and second for 2017. year. But my table holds one field for GrossSalesValue and other for dates. Can I get from such a table clustered column chart to compare year data side by side? Can I achieve this with measures and DAX? I've tried TOTALYTD and Calculate(...; SamePeriodLastYear), but it didn't work
Solved! Go to Solution.
Do you have a Calendar table?
If you do place the date on the axis and keep only the month from the resulting Hierarchy,
then drag the date field again but this time to the legend and keep only the year.
If no Calendar just break your date field into Month and Year columns and use those...
Place Month on the Axis, Year in the Legend and sales in the Values
Good Luck!
Hi @prokurors,
As Sean suggested, I could get the chart output like below. In my test, I didn't use calendar table, just select Month from date hierarchy as Axis, and select Year from date hierarchy as legend.
Best regards,
Yuliana Gu
Hi @prokurors,
As Sean suggested, I could get the chart output like below. In my test, I didn't use calendar table, just select Month from date hierarchy as Axis, and select Year from date hierarchy as legend.
Best regards,
Yuliana Gu
Do you have a Calendar table?
If you do place the date on the axis and keep only the month from the resulting Hierarchy,
then drag the date field again but this time to the legend and keep only the year.
If no Calendar just break your date field into Month and Year columns and use those...
Place Month on the Axis, Year in the Legend and sales in the Values
Good Luck!
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Check out the August 2024 Power BI update to learn about new features.
User | Count |
---|---|
111 | |
82 | |
63 | |
54 | |
52 |
User | Count |
---|---|
128 | |
115 | |
80 | |
65 | |
63 |