We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now
How can I create a chart which shows below -
1) Single Bar on left showing Last Year - Year to date Sales (based on which year is selected from year slicer)
2) Single Bar on tright showing Current Year - Year to date Sales (based on which year is selected from year slicer)
3) In between line chart showing month wise Sales (based on which year is selected from year slicer)
Please advise.
This chart could be created with the Deneb visual by using "hconcat" to combine the 3 charts into one visual.
Getting Started | Deneb (deneb-viz.github.io)
Pat
To learn more about Power BI, follow me on Twitter or subscribe on YouTube.
@PowerBuddy1 This will look different than your picture, because the scale for month will be much smaller than the YTD. What does your data model look like with relationships? You will need a DimDate table for this one: https://excelwithallison.blogspot.com/2020/04/dimdate-what-why-and-how.html
Then you can create measures to change between the selected year and last year:
Total Sales = SUM( Sales[Sales] )
YTD Sales = CALCULATE ( [Total Sales], DATESYTD( dimDate[Date] ) )
Prior YTD Sales = CALCULATE( [YTD Sales], DATEADD( dimDate[Date], -1, YEAR) )
Then use them in a column chart with Month.
I would recommend a card visual for the YTD totals.
Copying DAX from this post? Click here for a hack to quickly replace it with your own table names
Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C
I work as a Microsoft trainer and consultant, specialising in Power BI and Power Query.
www.excelwithallison.com
With this it gives me YTD and YTD LY per month.
Whereas it needs to be consolidated two bars at the end and in the center a line chart for MTD values.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 57 | |
| 38 | |
| 33 | |
| 19 | |
| 16 |
| User | Count |
|---|---|
| 67 | |
| 66 | |
| 40 | |
| 34 | |
| 25 |