Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Shivam_210121
New Member

Date ADD function, working incorrectly while selecting end of the month dates.

My dateadd function is giving me a problem. Whenever I select a date from 21st Apr'22 - 30th Apr'22 for the sum of sales, date add gives me a sum of values from 21st Mar'22 - 31st Mar'22 (End of the month) Technically, I want to compare sales from
21st Apr'22 - 30th Apr'22  v/s
21st Mar'22 - 30th Mar'22.

- I have a separate date table.
- There are no missing dates in the data, (i.e., all dates have some data)

Kindly help.

1 REPLY 1
amitchandak
Super User
Super User

@Shivam_210121 , Date add need continuous dates. So use date as date add

 

If you want add days

[Date] +10

 

If you want to add a month or year

Add 15 months 

Date as Dateadd - Decoding Date and Calendar 5-5 - Power BI Turning 5 Celebration Series
https://community.powerbi.com/t5/Community-Blog/Date-as-Dateadd-Decoding-Date-and-Calendar-5-5-Power...

Date(Year([Date]), Month([Date])+15, Day([date]))

 

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.