Forum Discussion
pmhoang94
Helper I
9 years agoMeasure YTD
Hi all, I have a issue with measure YTD when I filter Date. I have a table SalesInOut(MonthYear, DateID, Amount, Quantity, SalesType, FreeItem, YearID, PeriodID). I create a clustered column ch...
v-jiascu-msft
Microsoft Employee
9 years agoHi pmhoang94,
Did you verified the data when we applied the filter on the table?
1. X will return the max date in the whole table. For example, 20181231.
var x = CALCULATE(MAX(SalesInOut[DateID]), ALL(SalesInOut[DateID]))
If we choose 05-2017, this formula will return blank.
[YearID] = YEAR(x) && [PeriodID] <= MONTH(x)
2. SalesInOut[SalesType] = "O" while SalesInOut[SalesType] = "I" in the KPI.
Maybe these items upper will lead this problem.
Best Regards!
Dale