Forum Discussion

mithunt's avatar
mithunt
Frequent Visitor
4 years ago
Solved

Help needed to create Calculated Column in finding Max\Min\Average for Last Month

Dear PowerBians   I would need some assistance in finding a solution on how to implement below using Calculated Column. I was able to create using Calulate([Sales],PREVIOUSMONTH([Date])) however i...
  • CNENFRNL's avatar
    4 years ago

    I opt for non-context-transition func, typically date/time func instead of Time Intelligent funcs in a calculated column in order to avoid "undermining" intrinsic row context or unnecessary filter context altering.

    Min LM = 
    VAR __eolm = EOMONTH( EDATE( DATA[Date], -1 ), 0 )
    RETURN
        MINX( FILTER( DATA, EOMONTH( DATA[Date], 0 ) = __eolm ), DATA[Sales] )

     

    Excel worksheet formula is powerful enough,

  • Whitewater100's avatar
    Whitewater100
    4 years ago

    You are welcome! Would you be able to mark my reply as solved? Thanks!!