Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
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
Check out the September 2024 Power BI update to learn about new features.
Learn from experts, get hands-on experience, and win awesome prizes.
User | Count |
---|---|
114 | |
91 | |
88 | |
35 | |
35 |
User | Count |
---|---|
152 | |
99 | |
82 | |
63 | |
54 |