Don't miss your chance to take the Fabric Data Engineer (DP-700) exam on us!
Learn moreNext up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now
Hi all,
I really need your help please.
I have a table visual which has data in columns from 3 data sets, which is connected to year slicer.
I have been asked to add a hover with bar chart visual showing 2 years. I was able to create a bar chart with current year but I am unable to do one with previous year.
Could you please help, I've added my files to the below link. Would greatly appreacite your help. Thanks.
Both the solutions provided by Allison and WangBT are brilliant and I have learned interesting DAX measures. Thank you both very much. I'd like to accept both your responses as solutions.
Thank you very much.
This is much easier with a proper date table. I have converted your Month and Year columns into a start of month column. Would rather do this in data source or Power Query, but used DAX so I didn't need to connect to your excel files.
I then added my date table: https://excelwithallison.blogspot.com/2020/04/dimdate-what-why-and-how.html
Finally, created a measure for Prior Year:
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
Thank you very much.
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 |
|---|---|
| 53 | |
| 45 | |
| 44 | |
| 20 | |
| 19 |
| User | Count |
|---|---|
| 73 | |
| 71 | |
| 34 | |
| 33 | |
| 31 |