0

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

null
    • BI Project
    • Alister_Hill
    • 5 yrs ago
    • Reported - view

    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.

    • Itamar_Birenzweig
    • 5 yrs ago
    • Reported - view

    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?

    • BI Project
    • Alister_Hill
    • 5 yrs ago
    • Reported - view

    Itamar Birenzweig Thank you!

Content aside

  • Status Answered
  • 5 yrs agoLast active
  • 3Replies
  • 58Views
  • 2 Following