Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

Dynamic Waterfall Comparing Current Period to Last Period with Breakdown

I'm trying to create a visual which shows current month vs. last month's sales amount broken down by dealer.  This visual has to update on a monthly basis based on the current sales data's max date.  right now I'm filtering manually, there must be a better way to do this.  

 

 

  • Hi Anonymous ,

     

    You can use a measure as a filter like so:

    Measure =
    VAR PreviousMonthStart =
        EOMONTH ( TODAY (), -2 ) + 1
    VAR CurrentMonthEnd =
        EOMONTH ( TODAY (), 0 )
    RETURN
        IF (
            MAX ( 'Table'[Date] ) >= PreviousMonthStart
                && MAX ( 'Table'[Date] ) <= CurrentMonthEnd,
            1
        )
    

     

     

    Best Regards,

    Icey

     

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

2 Replies

  • Icey's avatar
    Icey
    Community Support

    Hi Anonymous ,

     

    You can use a measure as a filter like so:

    Measure =
    VAR PreviousMonthStart =
        EOMONTH ( TODAY (), -2 ) + 1
    VAR CurrentMonthEnd =
        EOMONTH ( TODAY (), 0 )
    RETURN
        IF (
            MAX ( 'Table'[Date] ) >= PreviousMonthStart
                && MAX ( 'Table'[Date] ) <= CurrentMonthEnd,
            1
        )
    

     

     

    Best Regards,

    Icey

     

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

    • ahp-sig's avatar
      ahp-sig
      Frequent Visitor

      This doesnt seem to work in latest version of PBI anymore. Downloaded the file but it doesnt produce any results in the chart. ☹️