Forum Discussion
DatesAdd Function with Custom Date - Help Needed
SimonSeez , Are you using Date table.
Please refer this video where I dicussed Why Time intelligence can fail - https://www.youtube.com/watch?v=OBf0rjpp5Hw
You need make sure 5 things. Please check.
Hello amitchandak
Yes, I am using a date table. Off to watch your video now
- amitchandak5 years agoSuper User
SimonSeez , in case that does not help. Also, the useful information provided by other super users/users does not help. then
Please share a sample pbix after removing sensitive data.
- SimonSeez5 years agoHelper III
Hello amitchandak
Educative video as expected. I subscribed to the channel as well. I have applied everything you said and I noticed you used a DatesYTD before you used the DatesAdd. I hadn't seen this used before so I tried it
This was my previous measure -
Calculate([Total Revenue], DateAdd('Date Table' [Date], -1, Quarter))
I modified it to seem like yours
Calculate([Total Revenue], DatesQTD(DateAdd('Date Table' [Date], -1, Quarter))). Strangely this gave me a blank result
I then remodified to this
Calculate([Total Revenue], DatesQTD(DateAdd('Date Table' [Date], -1, Year))) and strangely it gave me the correct result. I couldn't make sense of my the measure worked so I have some doubts.
Any ideas why?
- amitchandak5 years agoSuper User
SimonSeez , Thanks for subscribing.
Calculate([Total Revenue], DatesQTD(DateAdd('Date Table' [Date], -1, Quarter))) means last qtr. That is blank means no data in last qtr but data in last year same qtr.
That sound like strange.
Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.