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

Count of Sales needed

HI all,

 

I am looking to do 2 different measures which gives me the following: - 

 

 - for each date, I want to see the last 7 days of sales 

 - for each date, I want to see the last 30 days of sales

 

Example: - Today, I want to see that yesterdays date contains the count of sales for (22nd, 21st, 20th, 19th, 18th, 17th & 16th) which would then mean that 21st date would contact count of sales from 21st - 15th) - Of course the other measure should be doable by amending this one.

 

In my table, 

 

Hope that makes sense.

1 ACCEPTED SOLUTION

Hi @TheLegendTamer 

 

You can mark it as answer by clicking below option:

009.PNG

Community Support Team _ Dina Ye
If this post helps, then please consider Accept it as the solution to help the other members find it more
quickly.

View solution in original post

7 REPLIES 7
Fowmy
Super User
Super User

@TheLegendTamer 

Can you share some sample data and the expected result to have a clear understanding of your question?
You can save your files in OneDrive, Google Drive, or any other cloud sharing platforms and share the link here.
____________________________________
How to paste sample data with your question?
How to get your questions answered quickly?

_____________________________________
Did I answer your question? Mark this post as a solution, this will help others!.

Click on the Thumbs-Up icon if you like this reply 🙂

YouTube, LinkedIn

Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

Thanks for your reply.

 

The below is what I am hoping for - dont have any sample data yet im afraid.

 

3 measures in total - yesterday which is fine. Then last 7 days and last 30 days. So looking at yesterdays date on the 'x' axis it gives sum of sales from yesterday, last 7 days from yesterday and last 30 days from yesterday.

 

TheLegendTamer_0-1600857159862.png

 

you can use something like 

 

Rolling 7 Day Amount = CALCULATE(SUM(table[Value]),DATESINPERIOD(DimDate[Date],MAX(DimDate[Date]),-7,DAY))
 
Rolling 30 Day Amount = CALCULATE(SUM(table[Value]),DATESINPERIOD(DimDate[Date],MAX(DimDate[Date]),-30,DAY))






Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!

Proud to be a Super User!




Diamond! Thank you muchly

Hi @TheLegendTamer 

 

If the above posts help, please kindly mark it as a answer to help others find it more quickly. thanks!

If not, please kindly elaborate more.

 

Community Support Team _ Dina Ye
If this post helps, then please consider Accept it as the solution to help the other members find it more
quickly.

I have marked it as a thumbs up, doesnt this mean its the answer?

Hi @TheLegendTamer 

 

You can mark it as answer by clicking below option:

009.PNG

Community Support Team _ Dina Ye
If this post helps, then please consider Accept it as the solution to help the other members find it more
quickly.

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.