Showing results for 
Search instead for 
Did you mean: 

Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.

Memorable Member
Memorable Member

How to increase the value automatically monthly increase by 1 digit ?

Hi All


I have below expression working fine :-

Show Last 24 Month = IF ('Date'[Date] >= EDATE(TODAY(),-25), 1, 0)
But next month i need to change 25 to 26
May i know it there a way to automatic change by itself ?
Reasons :- So that i can show each sales staff their sales achieve for monthly in last X month they much achievment sales Y amount.


Thank you very much . I will try it out soon

View solution in original post

Community Support
Community Support

Hi @admin11 

You can create a table, column Month in the table is related to specific number, then switch the specific number according to column Month.


Create the column:

Show Last 24 Month =
VAR _month =
    MONTH ( TODAY () )
VAR _num =
        SELECTEDVALUE ( 'Table'[Value] ),
        FILTER ( 'Table', MONTH ( 'Table'[Month] ) = _month )
    IF ( 'Date'[Date] >= EDATE ( TODAY (), _num ), 1, 0 )



See sample file attached bellow.


By the way, I dont understand why you named the DAX column as Show Last 24 Month since you want the data of the past 25,26,27 months, is there anything wrong?


Best Regards,

Community Support Team _ Tang

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


Thank you very much . I will try it out soon

Super User
Super User

@admin11 , I think you are starting from fix date of 1 April 2019


Show Last 24 Month = IF ('Date'[Date] >= date(2019,04,01) , 1, 0)

Helpful resources

PBI November 2023 Update Carousel

Power BI Monthly Update - November 2023

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

Community News

Fabric Community News unified experience

Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.

Dashboard in a day with date

Exclusive opportunity for Women!

Join us for a free, hands-on Microsoft workshop led by women trainers for women where you will learn how to build a Dashboard in a Day!

Power BI Fabric Summit Carousel

The largest Power BI and Fabric virtual conference

130+ sessions, 130+ speakers, Product managers, MVPs, and experts. All about Power BI and Fabric. Attend online or watch the recordings.

Top Solution Authors
Top Kudoed Authors