Forum Discussion

psmith-nhs-inc's avatar
psmith-nhs-inc
Icon for Helper III rankHelper 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
      Icon for Helper III rankHelper 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
        Icon for Super User rankSuper User
        Oops that was typo. Thanks thou. Glad we resolved it. :)