Forum Discussion

manojk_pbi's avatar
manojk_pbi
Helper V
1 year ago
Solved

Filter Value based on the previous month

Hi , I tried with many options using the references but could not succed. I have single table having budget and forecast values defined for entire year. I would like present the previuos months bud...
  • Greg_Deckler's avatar
    1 year ago

    manojk_pbi So like this?

    Previous Month's Budget =
      VAR __Month = MONTH( TODAY() )
      VAR __Year = YEAR( TODAY() )
      VAR __Date = DATE( __Year, __Month, 1 )
      VAR __Result = MAXX( FILTER( ALL( 'Table' ), [Date] = __Date ), [Budget] )
    RETURN
      __Result