Forum Discussion

agd50's avatar
agd50
Helper V
3 years ago

Dynamic Previous Quarter Dax Measure (DistinctCount) Error

This dax formula does not automatically show the previous quarter for me (showing the wrong numbers - showing all numbers not the just the previous quarter). Would anyone know what's going wrong here?

Incidents Previous QTD =
CALCULATE(
    [Count of Incident],
    DATEADD(Dim_Calendar[Date],-1,QUARTER)

(Count of Incident being a simple distinct count formula)

2 Replies

  • ProjectKM's avatar
    ProjectKM
    Frequent Visitor

    If you want to see the previous quarter of [Count of Incident],
    it doesn't look like a problem with the way you wrote it.

    I think there's a problem somewhere else. Did you set the mark as date table in the Dim_Calendar table?

    • agd50's avatar
      agd50
      Helper V

      It appears to be already marked as a date table - they are in different tables if that makes a difference.