Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

Cumulative Counts

Hello,   I am dealing with a dataset for a hotel and I am trying to create a graph that shows the ramp up of reservations made for a certain date (usually a holiday).    I have created a measure ...
  • lc_finance's avatar
    6 years ago

    HI Anonymous ,

     

     

    You can download my proposed solution from here.

     

    Here is the DAX formula I propose for it:

    Cumulative_Count 2 = 
    var currentDate = MAX('Reservations'[res_created_at_date])
    
    return CALCULATE(COUNTROWS(FILTER('Reservations','Reservations'[res_created_at_date]<=currentDate)), ALL('Reservations'[res_created_at_date].[Month], 'Reservations'[res_created_at_date].[MonthNo], 'Reservations'[res_created_at_date].[Day]))

     

    Let me know if that works for you.

     

    LC

    Interested in Power BI and DAX templates? Check out my blog at www.finance-bi.com