Using StartDate and EndDate from Timeline in Calculated Measures

Hey, 

once again I need your help. For some of my calculations it is mandatory to get the first and the last date, filtered by the slicer type "timeline".

This works well as long as the date is not used on rows or columns ...

As soon as I'm using theDate within the rows this very simplistic dax measure doesn't work ...


Of course I'm aware that suddenly the beast "Filter Context" shows its face again :-)

I'm wondering how to determine the StartDate (from the timeline) and the EndDate (from the timeline) when "thedate" is actively contributing to the filtercontext.

In my opinion it is not another example of the "event in progress" situation, due to the fact that start and end dates are actively selected by the user and can not be derived from within the date model.

But maybe I'm just stuck again, so any hint is very much aprreciated

My little Excel file can be found here ...

https://onedrive.live.com/redir?resid=2B60311E30171113!2526&authkey=!ABZDOgGNVJR6His&ithint=file%2cxlsx

Tom

July 31st, 2015 8:47am

Yes, your min & max expressions are evaluated within the filter context of your Pivot tables.

ALLSELECTED can come to the rescue here :-)

Removes the filter context from your Pivot table & keeps the others (from your slicer selections, or even report filters).

minDateFromSlicer:=CALCULATE(min(dimDateTiny[theDate]); ALLSELECTED('dimDateTiny'))

Free Windows Admin Tool Kit Click here and download it now
July 31st, 2015 12:05pm

Of course - the magic of ALLSELECTED, thanks a lot
July 31st, 2015 12:51pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics