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

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now

Reply
Pratima
Advocate II
Advocate II

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
Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

February Power BI Update Carousel

Power BI Monthly Update - February 2026

Check out the February 2026 Power BI update to learn about new features.

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.