Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
Hi All,
How to Calculate no.of days from two different dates. (e.g 2019-07-13 and 2020-01-10) There is the year changed.
Solved! Go to Solution.
Hi,
Please try to create three calculated columns:
Year difference = DATEDIFF('Table'[DateStart],'Table'[DateEnd],YEAR)
Month difference = DATEDIFF('Table'[DateStart],'Table'[DateEnd],MONTH)
Day difference = DATEDIFF('Table'[DateStart],'Table'[DateEnd],DAY)
And the result shows:
Best Regards,
Giotto Zhi
Hi,
Please try to create three calculated columns:
Year difference = DATEDIFF('Table'[DateStart],'Table'[DateEnd],YEAR)
Month difference = DATEDIFF('Table'[DateStart],'Table'[DateEnd],MONTH)
Day difference = DATEDIFF('Table'[DateStart],'Table'[DateEnd],DAY)
And the result shows:
Best Regards,
Giotto Zhi
Hi,
Try using DATEDIFF
Column = DATEDIFF('Table'[Startdate],'Table'[Enddate],DAY)
I tried it but shown only difference from the days but there is a year and the month is different.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
78 | |
76 | |
59 | |
35 | |
33 |
User | Count |
---|---|
100 | |
62 | |
56 | |
47 | |
41 |