Forum Discussion
dhamodarankms
6 years agoNew Member
DAX - DATEADD Function
Dear Power BI Community, I am Dhamo, Power BI Reports and Dashboards developer along with Data engineering and Modeleling. Today, I am doing a Date Model and found a wired situation while used DA...
vivran22
6 years agoCommunity Champion
Hello dhamodarankms ,
DATEADD function requires a date table which should include all the days within one year. A complete date table is of great importance for DATEADD to behave as expected.
DATEADD function uses three rules:
- It only returns days that exists in the date column. If some expected dates are missing, then it returns only those dates that are not missing in the date column
- If a date does not exist in the corresponding month after the shifting operation, then the result of DATEADD includes the last day of the corresponding month.
- If the selection includes the last two days of a month, then the result of DATEADD includes all the days between the corresponding days in the shifted month and the end of the shifted month.
Alternatively, you can use PARALLELPERIOD.
Cheers!
Vivek
If it helps, please mark it as a solution. Kudos would be a cherry on the top 🙂
If it doesn't, then please share a sample data along with the expected results (preferably an excel file and not an image)
Blog: vivran.in/my-blog
Connect on LinkedIn
Follow on Twitter
- dhamodarankms6 years agoNew Member
Thanks for your extended support in the regard Vivek. I will text your solution and get back to you with my understanding.
You Welcome.
Regards,
SD