cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper I
Helper I

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

Accepted Solutions
Highlighted

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
Highlighted
Community Champion
Community Champion

@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

Highlighted

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

 

Highlighted

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!!

Diamond! Thank you muchly

Highlighted

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.
Highlighted

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

Highlighted

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

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Community Conference

Microsoft Power Platform Communities

Check out the Winners!

secondImage

Create an end-to-end data and analytics solution

Learn how Power BI works with the latest Azure data and analytics innovations at the digital event with Microsoft CEO Satya Nadella.

Top Solution Authors
Top Kudoed Authors