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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
Pratima
Helper III
Helper III

How to calculate latest 30 days sales amount in dax

Hi All,

How to calculate latest 30 days sales amount in dax. can anyone please help me the same asap.

 

Thanks,

Pratima 

 

1 REPLY 1
v-xjiin-msft
Solution Sage
Solution Sage

Hi @Pratima,

 

Generally, you can try this measure:

 

Last 30 days =
CALCULATE (
    SUM ( Table2[val] ),
    FILTER (
        ALL ( Table2 ),
        Table2[date]
            >= MAX ( Table2[date] ) - 30
            && Table2[date] <= MAX ( Table2[date] )
    )
)

1.PNG

 

If it doesn't satisfy your requirement, please share us more detaile information like some sample data and its corresponding desired result. So that we can know the right direction.

 

Thanks,
Xi Jin.

 

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.