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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

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
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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

Top Solution Authors