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
Hello all,
I'm trying to compare the YTD sales with the goals on YTD format. This is the idea that I want to present:
I can make a table adding the goal of each month, which then I can graph as the blue line. The table below:
The problem I'm finding is how to add what was sold in Oct (in the image) with Nov, so those sales stack up in Nov, the same with Dec (which should be Oct, Nov and Dec stacked), and so on.
The idea of the graph is to show how deviated the sales are resulting against the final goal amount.
I tried with TOTALYTD, but it won't add up the months' results.
Is there any other function? Or other visualization to achieve this?
Thank you.
Solved! Go to Solution.
You may try this Measure.
YTD venta = CALCULATE(SUM('Table'[Venta]),FILTER(ALL('Table'),'Table'[Px]<=MAX('Table'[Px])))
The result should look like this:
For more details, please refer to the attached pbix file.
Best Regards,
Community Support Team _ Caiyun
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
You may try this Measure.
YTD venta = CALCULATE(SUM('Table'[Venta]),FILTER(ALL('Table'),'Table'[Px]<=MAX('Table'[Px])))
The result should look like this:
For more details, please refer to the attached pbix file.
Best Regards,
Community Support Team _ Caiyun
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
Hi,
For YTD calculation you can use this pattern: CALCULATE(SUM('Table'[Value]),DATESYTD('Calendar'[Date])).
I also recommend checking out SQLBI's article on running totals: https://www.sqlbi.com/articles/computing-running-totals-in-dax/
I hope these will help you to solve your issue and if they do consider accepting this post as a solution and giving it a thumbs up!
Proud to be a Super User!
Hi ValtteriN,
Thank you for your reply, but that pattern brings the same results as a TOTALYTD.
What is needed is a calculation that can add the previous months sales to the current month:
October should be 39; November should be 181; December 220, as it shows in the third column.
Thank you!
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 |
---|---|
21 | |
20 | |
17 | |
15 | |
13 |
User | Count |
---|---|
42 | |
36 | |
25 | |
22 | |
18 |