Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more
Hello,
To provide a bit more context, i am trying to count all the records, on a rolling basis, 1 month before any agreed delivery date. So any record, that has a delivery date in the upcoming 1 month must be counted.
I am a bit confused about the way DATEADD function works. The two measures below give me different answers, only difference being one is in DAYS and one is in MONTH
1 month to Agreed delivery date = CALCULATE(  
   COUNTROWS('TP_ACTIVITIES'),  
   DATEADD('TP_ACTIVITIES'[AgreedDeliveryDate], -1, MONTH)  
)
 
 
1 month to Agreed delivery date =
 CALCULATE(
            COUNTROWS('TP_ACTIVITIES') ,
            FILTER('TP_ACTIVITIES', DATEADD('TP_ACTIVITIES'[AgreedDeliveryDate], -1, MONTH
                )
            )
)
There is a difference in the result, could you help me understand why?
Hi @nrj1806 ,
In my test ,the two measure return the same value ,could you pls share your sample data and output result,remember to remove confidential data.
And I add a few blogs and videos that you could reference to learn more about the function of DATEADD.
Using DATEADD() and other Date Tips for Filtering Data in Power BI
The DATEADD Function: The Best And Most Versatile Time Intelligence Function in Power BI
DATEADD function (DAX) - DAX DATEADD function In Power BI Desktop
Best Regards
Lucien
I have added a picture of the data. Both the cards should show the same numbers considering the dates in the column.
I have tried three formulas to pick the dates from last month, but they dont seem to work.
I see where i could be potentially going wrong now. I shouldnt be using 30 for month at all since some months have 31 days or 28.
Hi @nrj1806 ,
Does the month that you are using in the 1st DAX expression (of Month) the one which has 30 days in it?
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.