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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
MeghnaZutshi
Frequent Visitor

Calculations on dates

How to get MTD sales  for current month and for previous month, same date range? Suppose today is April 15 so i would require sales from

1. 1st to 14th April and

2. 1st to 14th March . 

 

These should be two seperate calculations

Thanks in advance

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @MeghnaZutshi ,

 

According to your description, we can create two measures.

MTD Sales April =
CALCULATE (
    SUM ( Sales[Sales Amount] ),
    DATESBETWEEN (
        'Date'[Date],
        DATE ( YEAR ( TODAY () ), MONTH ( TODAY () ), 1 ),
        TODAY () - 1
    )
)
MTD Sales March =
CALCULATE (
    SUM ( Sales[Sales Amount] ),
    DATESBETWEEN (
        'Date'[Date],
        DATE ( YEAR ( EOMONTH ( TODAY (), -2 ) ), MONTH ( EOMONTH ( TODAY (), -2 ) ), 1 ),
        EOMONTH ( TODAY (), -2 ) + DAY ( TODAY () ) - 1
    )
)

Best Regards,

Neeko Tang

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

1 REPLY 1
Anonymous
Not applicable

Hi @MeghnaZutshi ,

 

According to your description, we can create two measures.

MTD Sales April =
CALCULATE (
    SUM ( Sales[Sales Amount] ),
    DATESBETWEEN (
        'Date'[Date],
        DATE ( YEAR ( TODAY () ), MONTH ( TODAY () ), 1 ),
        TODAY () - 1
    )
)
MTD Sales March =
CALCULATE (
    SUM ( Sales[Sales Amount] ),
    DATESBETWEEN (
        'Date'[Date],
        DATE ( YEAR ( EOMONTH ( TODAY (), -2 ) ), MONTH ( EOMONTH ( TODAY (), -2 ) ), 1 ),
        EOMONTH ( TODAY (), -2 ) + DAY ( TODAY () ) - 1
    )
)

Best Regards,

Neeko Tang

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

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.