Forum Discussion

psmith-nhs-inc's avatar
psmith-nhs-inc
Helper III
9 years ago
Solved

How do I determine Current Quarter?

CMisCurrentMonth = if('Date'[MonthNumber] = Month(Today()),"CM",'Date'[Month])

This gives me a slicer/filter where current month is always selectable by selecting "CM".

 

CYisCurrentYear = if('Date'[Year] = Year(Today()),"CY",format('Date'[Year],"0"))

This gives me a slicer/filter where current year is always selectable by selecting "CY"

 

These rely on Year() and Month()  to do thier thing.

In between those two are CQisCurrentQuarter but...

 

There is no Quarter() function.

How do I get the equivilent of Quarter(Today)?

 

Thanx.

 

Phil

 

 

  • i think you can get using following formula:

     

    CurrentQuarter =ROUNDUP(MONTH([TODAY()])/3, 0)

5 Replies

  • i think you can get using following formula:

     

    CurrentQuarter =ROUNDUP(MONTH([TODAY()])/3, 0)
    • psmith-nhs-inc's avatar
      psmith-nhs-inc
      Helper III

      One thing, Today() does not go into brackets.

       

      CurrentQuarter =ROUNDUP(MONTH(TODAY())/3, 0)

       

      That worked out quite well.   Thank you!

       

      Phil

      • parry2k's avatar
        parry2k
        Super User
        Oops that was typo. Thanks thou. Glad we resolved it. :)