Count members in List - for date ranges
Hi,
I have a bvery basic list of dates, using a datefro mand date to parameter. I am trying to make a measure of the count the number of dates in this list, but none of the methods I try seem to work.
Does anybody know how to easily do this in the formulate module?
It is essentially
([Dates].[Date].@[DateFrom]:[Dates].[Date].@[DateTo])
I've tried Count() DistinctCount() .Count
The reason for this is that I need to make prior and subsequent equivalent lists:
Prior: ([Dates].[Date].@[DateFrom].Lag(CountofDays):[Dates].[Date].@[DateFrom].Lag(1))
Subsequent: ([Dates].[Date].@[DateTo].Lead(1):[Dates].[Date].@[DateTo].Lead(CountofDays))
Thanks,
Alister
3 replies
-
I have it,
Count({ { [*2ec5cea8-f027-4042-b4dc-1b18d24b04b1*] } },INCLUDEEMPTY)
Where the GUI is the date range
I need to spend some more time learning MDX.
-
HI Alister,
To count the number of items in a range list, first create your range list and save it. Next, create a new Formula and drag Count to the canvas (from the Aggregation Blocks section in the Tool Panel).
Then, select the Count object, click on Pick List and select your range set. Lastly, select Measures as Context and save.
Does this work for you?
-
Itamar Birenzweig Thank you!