Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
Sales This Year = TOTALYTD(SUM(SalesDetails[Sales]),SalesDetails[Invoices.Day])
Sales Last Year = CALCULATE([Total Sales],SAMEPERIODLASTYEAR(Calendar_dim[Date]))
Thank you so much
Solved! Go to Solution.
Hi @Anonymous,
In my opinion, the issue is related to your chart axis. The Axis in your chart is MonthNameLong which only shows the month. It also means, your chart cannot tell which year the month belongs to. As in your source table, there exists data in April 2017. So there will exist data in April.
To resolve your issue, please try to add Year and Month as Axis in chart.
Thanks,
Xi Jin.
Hi,
Try this
Sales This Year = IF(ISBLANK(SUM(SalesDetails[Sales])),BLANK(),TOTALYTD(SUM(SalesDetails[Sales]),Calendar_dim[Date]))
Ensure that the months appearing in your visual are from the Calendar_dim table.
Hope this helps.
Hello Ashish,
Thank you so much for the help. when I use the date from calendar instead of date from sales it will not accurate somehow. Please look at the file below. I tried what you have suggested, still the same.
Thank you so much
Hi,
Reduce that file size to a couple of MB's please.
Hello,
I really appreciate your help. I have deleted some records and you can see it from HERE. I think I reduce the file size to less than 3.5 MB.
Thank you so much
Hi @Anonymous,
In my opinion, the issue is related to your chart axis. The Axis in your chart is MonthNameLong which only shows the month. It also means, your chart cannot tell which year the month belongs to. As in your source table, there exists data in April 2017. So there will exist data in April.
To resolve your issue, please try to add Year and Month as Axis in chart.
Thanks,
Xi Jin.
Hey Xi Jin,
Thank you so much for the advice. When I Just add sales to measures and drag year into legend it will fix my issue.
Again, thank you