Starting December 3, join live sessions with database experts and the Microsoft product team to learn just how easy it is to get started
Learn moreShape the future of the Fabric Community! Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions. Take survey.
Hi Helpers,
I attached sample report because I need to make it from my source data in PBI
I need to know how to calculate YTD , MTD & Sales performance
Hi @hanyfouda2023 ,
You can use the calculation group to put in the indicators for 2023 and 2024, and just calculate the MTD and YTD to know all the indicators for these two years, for your easy comparison.
The calculation group DAX might work for you:
MTD = CALCULATE(SELECTEDMEASURE(), DATESMTD('Date'[Date]))
PY = CALCULATE(SELECTEDMEASURE(), SAMEPERIODLASTYEAR('Date'[Date]))
YTD = CALCULATE(SELECTEDMEASURE(), DATESYTD('Date'[Date]))
Here are some of my examples that can be just replaced with your data
Best Regards,
Xianda Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi v-xiandat,
Thanks for your replay,
For MTD it works fine but for PY & YTD not accurate, when I seleced year 2023 & 2024 PY & YTD calaculated 2 periods
For example if MTD is 10 for 2024 , 10 for 2023 for the same period last year then PY & YTD became 20 instead of 10
here is the measures
Hi @hanyfouda2023 ,
Can you send me your pbix file, I'd like to see where the problem is occurring.
Best Regards,
Xianda Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Here you are the file for your support
https://drive.google.com/file/d/1UfWPmvxhpBH-GGE1Gj9hHA3YKRAPvNvQ/view?usp=sharing
Hello , sorry for late answer could you please let me know how to send you the file here
Hi v-xiandat-msft,
Thanks for your support but due to internal company issues I cant share any company data in public
Thanks
hello @hanyfouda2023
you can use this pattern :
MTD :
YTD :
Hi Daniel29195,
It works fine but if I need to make it for year 2023 in the same visual to compare it with 2024 how can i make it because when I select 2023 to 2024 MTD became not accurte
User | Count |
---|---|
93 | |
92 | |
85 | |
83 | |
49 |
User | Count |
---|---|
150 | |
142 | |
112 | |
73 | |
55 |