Forum Discussion

AlexFulgosi's avatar
AlexFulgosi
Frequent Visitor
6 years ago
Solved

Counting selected month at certain month values

Hi everyone!   I have a table with a row for each month and country, and a fake date that refers to the beginning of the month. I need a DAX formula to count the rows of the table (the months) that...
  • amitchandak's avatar
    amitchandak
    6 years ago

    Check the screenshot, is this what you need. Please find formula

    Cumm month = 
    var _min = minx(ALLSELECTED('Date'),('Date'[Date]))
    return
    CALCULATE(DISTINCTCOUNT('Date'[Month-Year]),FILTER(all('Date'),'Date'[Date]<=max('Date'[Date])&& 'Date'[Date]>=_min))

    This calendar is attcahed with my facts.