Forum Discussion

bensiqc's avatar
bensiqc
Helper I
3 years ago
Solved

Create Calculated Column for Relative Month

I'm having trouble building out a calculated column that essentially uses a nested if statement to determine whether a period is within the current complete month (last month), the previous complete ...
  • Ahmedx's avatar
    3 years ago

    pls try this

     

    Relative Complete Month = 
       VAR _toDay = TODAY()
       VAR _Last1month =  EOMONTH(_toDay,-1)
       VAR _Last2month =  EOMONTH(_toDay,-2)
    RETURN
    SWITCH( TRUE(),
          EOMONTH (BillingSummary_0000_V70[Accounting Period Date],0) = _Last1month , "Current Complete Month",
       
          EOMONTH (BillingSummary_0000_V70[Accounting Period Date],0) = _Last2month , "Prior Complete Month",
    
    "Other" )