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
Boni
Frequent Visitor

Dax Funktion for the Previous last 7 days ( Aim = day over day about the last 7 Days from Today)

Hi Community, 
it would be Awsome if some one could Help me! 
I try to Calculate the Previos last 7 days to caculate at the end an Day over day Calculation. At the end I wanted to see how high the Sales have increased oder decreased in the last seven day from today on.
Thanks for Help Guys
Boni 

1 REPLY 1
Mohammad_Refaei
Solution Specialist
Solution Specialist

It is difficult to answe while you are not sharing anything about the model or the fields.

In general, you need to filter the data field so you will probably use a formula like this:

Last 7 Days Sales =
CALCULATE (
    SUM ( [Sales] ),
    FILTER ( ALL ( [Date Field] ), [Date Field] >= [Date Field] - 7 )
)

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.