Don't miss your chance to take the Fabric Data Engineer (DP-600) exam for FREE! Find out how by attending the DP-600 session on April 23rd (pacific time), live or on-demand.
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
Hello,
I'm trying to show a sparkline of a data set for all time, and compare it to the average of that data set for just the past week. Below is a screenshot with my measure, my matrix table that isn't working, and a table that's showing all my data. I've also attached the .pbix file.
My problem is if for a given week there's no data for one of the vendors, rather than showing 0 it gives an incorrect average. What's also strage is this incorrect average is not factored into the total average. So in my matrix the average for A, B and the total is correct, but the average for C is wrong and should be 0 or null. Any ideas of how I can fix this?
Thanks!
Solved! Go to Solution.
@left4pie2 Not sure what your data model relationships look like but seems like maybe the StartofWeek variable is getting filtered by your Vender, and so showing the previous week.
Try adding an ALL to your MAX date variable and see if that helps.
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
@left4pie2 Not sure what your data model relationships look like but seems like maybe the StartofWeek variable is getting filtered by your Vender, and so showing the previous week.
Try adding an ALL to your MAX date variable and see if that helps.
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
That worked!
I used the calculate function around the maxdate variable and used all to cancel the filters.
Thanks for the help!! 🙂
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.
Experience the highlights from FabCon & SQLCon, available live and on-demand starting April 14th.
| User | Count |
|---|---|
| 48 | |
| 40 | |
| 40 | |
| 20 | |
| 16 |
| User | Count |
|---|---|
| 70 | |
| 67 | |
| 32 | |
| 27 | |
| 26 |