Forum Discussion

agd50's avatar
agd50
Helper V
2 years ago
Solved

Measure - Count All Data Except previous quarter?

Does anyone know how to change this measure (perhaps a new one) that can do a count excluding the previous quarter? (No YTD) Count of Incident YTD -1Q = VAR _today =     TODAY () VAR ...
  • devesh_gupta's avatar
    2 years ago

    agd50 Have you tried this one...

     

    over all  = Sum(Sales[Sales Amount])

     

    Last Qtr Today = 
    var _today = today()
    var _max = eomonth(_today, -1*if( mod(Month(_today),3) =0,3,mod(Month(_today),3)))
    var _min = eomonth(_max,-3)+1
    return 
    CALCULATE(Sum(Sales[Sales Amount]) , FILTER('Date','Date'[Date] >=_min && 'Date'[Date] <= _max))

     

    Then Total other than last qtr =

    [Over all] - [Last Qtr Today]

     

    In this, you can replace the measure sum with count as you need count.

    Also confirm are you using date filter on the page or not cause that can change the solution