Forum Discussion
Custom month start and end date dax
- 4 years ago
Hi Anonymous ,
I see what you're trying to do. In this case, it is a combination of what CNENFRNL and I have suggested you to do. You need to create that calculated column along with the measures.
There's a slight data model update required. The expected output is shown below:A sample modified pbix is supplied for you: https://1drv.ms/u/s!An8CCFsOzw0uhQpWhPjO_ua_gE1C?e=UR4kGE
Hi Anonymous ,
What are you trying to build with these dates? Do you have a sample model or a base measure that you'd like to use the date range?
I am assuming that you only wanted to return the output of ranges of dates. If this assumption is wrong, please explain with sample input and sample output so we can be on the same page.
hnguy71 , Please refer my below pbix file. I want to calculate current month , last 3 months and ytd production based on the custom month start and end dates.
https://drive.google.com/file/d/1R3WZpJD2-KF8fWi2sotRE1B__2fHLv5C/view?usp=sharing
- hnguy714 years ago
Super User
Hi Anonymous ,
I see what you're trying to do. In this case, it is a combination of what CNENFRNL and I have suggested you to do. You need to create that calculated column along with the measures.
There's a slight data model update required. The expected output is shown below:A sample modified pbix is supplied for you: https://1drv.ms/u/s!An8CCFsOzw0uhQpWhPjO_ua_gE1C?e=UR4kGE
- Anonymous4 years agoNot applicable
hnguy71 thanks for this wonderful solution.
ytd for jan month is showing wrong, we need inculde 26-2021 to 31-2021 data also.
Month start dates for dates after 25th december should be jan of next year.
Please helpPlease help
- hnguy714 years ago
Super User
Hi Anonymous ,
I have adjusted the dates to include year end dates to roll towards next year. You may use the same link and download the pbix again.