Forum Discussion
davidell
9 years agoFrequent Visitor
YTD time intelligence wrong numbers-Odd behavior?
Hi PBI community, I have encounted a problem with performing simple time intelligence functions on dataset. I’ve crawled the internet for a solution sadly without any luck, where as I hope some of y...
bsas
Post Patron
9 years agoHi davidell,
You need to use MIN and MAX in calculate. E.G Calculate(SUM([sales]), Filter(table, and( your end date <= Max(alldates.[date]), your end date >= Min(alldates.[date]))))
or
total sale during 2015/1/1 to 2015/7/20 = CALCULATE(SUM(Sales[SALE]),AND(Sales[DATE]<=DATE(2015,7,20),Sales[DATE]>=DATE(2015,1,1)))
Also you can searc in YTD solved problems here. There are a lot of similar topics.