Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
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!
User | Count |
---|---|
20 | |
14 | |
11 | |
8 | |
6 |
User | Count |
---|---|
23 | |
23 | |
20 | |
15 | |
10 |