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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.