Reputation: 11
I have a calendar table as below
I want to get the last working date based on DayType. Here H=Holiday and W=Working Day
So, I create a measure as follows
LastWorkingDay = CALCULATE(LASTDATE(RollingCalender_LookUp[Date]), FILTER(RollingCalender_LookUp,RollingCalender_LookUp[DayType]="W"))
But it did not give me the correct result. The measure gives me Blank. Can you please tell me the mistake I did here. Thanks.
Upvotes: 1
Views: 3156
Reputation: 11
I solve the the problem with the following code.
LastWorkingDay = CALCULATE(MAX(RollingCalender_LookUp[Date]), FILTER(ALL(RollingCalender_LookUp),RollingCalender_LookUp[DayType]="W"))
Thanks.
Upvotes: 0