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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
tracytran91
Helper III
Helper III

Dynamic % Growth based on selected date slicer

Hi Folks, 

 

I would like to calculate the growth percentage (%) based on selected date slicer. 

 

Any help is high appreciated. 

Thank you in advance. 

 

1 ACCEPTED SOLUTION

Hi @tracytran91 ,

Suppose you are comparing the past 3 months with the current month, you can create a measure like this:

Growth% = 
VAR _mindate =
    CALCULATE ( MIN ( 'Table'[Date] ), ALLSELECTED ( 'Table'[Date] ) )
VAR _maxdate =
    CALCULATE ( MAX ( 'Table'[Date] ), ALLSELECTED ( 'Table'[Date] ) )
VAR last3month =
    CALCULATE (
        SUM ( 'Table'[value] ),
        FILTER (
            ALL ( 'Table' ),
            'Table'[Date] >= _mindate
                && 'Table'[Date] <= _maxdate
        )
    )
VAR currentmonth =
    CALCULATE (
        SUM ( 'Table'[value] ),
        FILTER (
            ALL ( 'Table' ),
            YEAR ( 'Table'[Date] ) = YEAR ( TODAY () )
                && MONTH ( 'Table'[Date] ) = MONTH ( TODAY () )
        )
    )
RETURN
    DIVIDE ( currentmonth - last3month, last3month )

re.png

Attached a sample file in the below, hopes to help you.

 

Best Regards,
Community Support Team _ Yingjie Li
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

5 REPLIES 5
tracytran91
Helper III
Helper III

@v-yingjl @amitchandak Thank for your solution. Unfortunately, the result is not as I expected. 

I would like selected date on slicer such as "last 3 months", "last 6 months", "last 1 year"..... and it shows up the % growth regarding to the selected date. 

 

 

unsa.png

 

Hi @tracytran91 ,

Suppose you are comparing the past 3 months with the current month, you can create a measure like this:

Growth% = 
VAR _mindate =
    CALCULATE ( MIN ( 'Table'[Date] ), ALLSELECTED ( 'Table'[Date] ) )
VAR _maxdate =
    CALCULATE ( MAX ( 'Table'[Date] ), ALLSELECTED ( 'Table'[Date] ) )
VAR last3month =
    CALCULATE (
        SUM ( 'Table'[value] ),
        FILTER (
            ALL ( 'Table' ),
            'Table'[Date] >= _mindate
                && 'Table'[Date] <= _maxdate
        )
    )
VAR currentmonth =
    CALCULATE (
        SUM ( 'Table'[value] ),
        FILTER (
            ALL ( 'Table' ),
            YEAR ( 'Table'[Date] ) = YEAR ( TODAY () )
                && MONTH ( 'Table'[Date] ) = MONTH ( TODAY () )
        )
    )
RETURN
    DIVIDE ( currentmonth - last3month, last3month )

re.png

Attached a sample file in the below, hopes to help you.

 

Best Regards,
Community Support Team _ Yingjie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

@tracytran91 , do want like this diff 3 vs 3 before it 

 

Rolling 3 = CALCULATE(sum(Sales[Sales Amount]),DATESINPERIOD('Date'[Date ],eomonth(MAX('Date'[Date]),0),-3,MONTH))
Rolling 3 before 3 = CALCULATE(sum(Sales[Sales Amount]),DATESINPERIOD('Date'[Date ],eomonth(MAX('Date'[Date]),-3),-3,MONTH))

 

or

 

Rolling 3 = CALCULATE(sum(Sales[Sales Amount]),DATESINPERIOD('Date'[Date ],MAX('Date'[Date]),-3,MONTH))
Rolling 3 before 3 = CALCULATE(sum(Sales[Sales Amount]),DATESINPERIOD('Date'[Date ],MAXX('Date',dateadd('Date'[Date],-3,month)),-3,MONTH))

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
v-yingjl
Community Support
Community Support

Hi @tracytran91 ,

You can create a date table based on your source table and use it as a slicer:

Date = DISTINCT('Table'[Date])

Create a measure like this to calculate growth%:

Growth% =
VAR _selectdatevalue =
    CALCULATE (
        SUM ( 'Table'[value] ),
        FILTER ( ALL ( 'Table' ), 'Table'[Date] = SELECTEDVALUE ( 'Date'[Date] ) )
    )
RETURN
    DIVIDE ( SUM ( 'Table'[value] ) - _selectdatevalue, SUM ( 'Table'[value] ) )

1.png2.png

Attached a sample file in the below, hopes to help you.

 

Best Regards,
Community Support Team _ Yingjie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

amitchandak
Super User
Super User

@tracytran91 , With one date(using date table) with min and max

measure =
var _max = maxx(allselected(Data), Data[Date])
var _Min = minx(allselected(Data), Data[Date])
return
divide(calculate([measure],filter('Date', 'Date'[date] =_max)) -calculate([measure],filter('Date', 'Date'[date] =_min)),calculate([measure],filter('Date', 'Date'[date] =_min)))

 

With two date ranges

https://community.powerbi.com/t5/Community-Blog/Comparing-Data-Across-Date-Ranges/ba-p/823601

 

To get the best of the time intelligence function. Make sure you have a date calendar and it has been marked as the date in model view. Also, join it with the date column of your fact/s. Refer :radacad sqlbi My Video Series Appreciate your Kudos.

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors