Forum Discussion

ClaireBear's avatar
ClaireBear
Helper I
6 years ago
Solved

Previous Month Calculated Column not working for January

Hello,    I have a calculated column that flags previous month entries. The issue im having is that now in January, the calculation does not seem to work. Last year this was working beautifully.  ...
  • Gordonlilj's avatar
    Gordonlilj
    6 years ago

    The Quarter function came with the 2019 december update.

    You could use Roundup instead

     

    IsPreviousQuarter = 
    
    IF (
     YEAR ('Fact Sales'[TransactionDateTime].[Date]) & 
     ROUNDUP(MONTH('Fact Sales'[TransactionDateTime].[Date])/3,0) = 
      FORMAT(DATE( YEAR(TODAY()),
                   ROUNDUP(MONTH(TODAY())/3,0)-1,
                   DAY(TODAY())),"YYYYQ"),
    "Yes",
    "No"
    )