Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
bo_wang5
Helper II
Helper II

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.  

 

bo_wang5_1-1631939166087.png

 

1 ACCEPTED SOLUTION
Icey
Community Support
Community Support

Hi @bo_wang5 ,

 

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
    )

MEASURE FILTER.PNG

 

 

Best Regards,

Icey

 

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

View solution in original post

2 REPLIES 2
Icey
Community Support
Community Support

Hi @bo_wang5 ,

 

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
    )

MEASURE FILTER.PNG

 

 

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
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. ☹️

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.