I'm having trouble with a faily complex Measure when paired with a Date filter context. The use case has to do with Billing, and a Company (aka "Customer") Retention Status being "Landed" when they are first billed, "Churned" if billing stops, and then "Reactivated" if they are billed again in the future.
Below is the desired output. The highlighted "Reactivation_Amount" is the issue.
Below is my current output. Notice that the $537.50 is incorrectly classified as Landed. However, when [Date] is not in the row context (Company level), this amount shows up under "Reactivation."
The DAX for the Measures is complex because the classification of Landed/Reactivated/Churned is evaluated at the Company-Date level, although reporting (row context) may be at different levels. The only difference between [Landed_Amount] and [Reactivation_Amount] is the bolded section ... "Landed" records are those where the DateKey = MIN([DateKey]) for that Company, and "Reactivated" records are those where DateKey <> MIN([DateKey])
I've been racking my brain and trying different options to solve this Measure over the past few days, but still no luck. I think ALL() and ALLSELECTED() are on the right path of what's needed for the MinDate part of this Measure. It needs to take into account all the filter contexts applied *except* Date. ALL() removes all filter contexts which goes too far, and ALLSELECTED() is still affected by Date, so not enough. I can see that ALLSELECTED() is a complex function that can be used in different ways (on table or column), and it could possibly be used to solve this issue, but unclear on how to do it.
I've posted a sample of the data at the below link, which includes the example I used in this post: