Forum Discussion

ElvirBotic's avatar
ElvirBotic
Helper III
3 years ago

Count Records Current Month/Year

Hello, 

 

I am a little confused on a measure I am working on. So, I want to count how many submissions we have for the current month of the current year. I do not want the user to select a year for the result to display. I want it to dynamically show the submissions for month to date and year to date. The dataset covers multiple years. My current measure looks like this...

Nominations MTD =
CALCULATE (
    [Total Nominations],
    DATESMTD ( 'Employee Nominations'[Completion time] )
)

My Total Nominations Measure is simple too... CALCULATE ( COUNTROWS ( Employee Nominations ) )

Is there a function that will show the current MTD total and YTD total without having to select the year from the slicer? 
 
 

4 Replies

  • Arul's avatar
    Arul
    Super User

    ElvirBotic ,

    This should work without selecting year from the slicer. What is the issue are you having at the moment?

    Thanks,

    Arul

    • ElvirBotic's avatar
      ElvirBotic
      Helper III

      Well when I filter the data source to verify if the count is correct for the month I do not see the expected result. Example, I should have a value of 0 for this month, but the measure displays 3. When I add the measure to a table the values displayed are changing based on the year slicer.