cancel
Showing results for
Did you mean:
Highlighted
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
Community Support

## Re: Count of Sales needed

You can mark it as answer by clicking below option:

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

## Re: Count of Sales needed

@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?

_____________________________________
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 🙂

Highlighted
Helper I

## Re: Count of Sales needed

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.

Highlighted
Memorable Member

## Re: Count of Sales needed

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))
Highlighted
Helper I

## Re: Count of Sales needed

Diamond! Thank you muchly

Highlighted
Community Support

## Re: Count of Sales needed

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
Helper I

## Re: Count of Sales needed

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

Highlighted
Community Support

## Re: Count of Sales needed

You can mark it as answer by clicking below option:

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.

Announcements

#### Power Platform Community Conference

Check out the on demand sessions that are available now!

#### Microsoft Power Platform Communities

Check out the Winners!

#### Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

#### Maratón de Soluciones de Negocio Microsoft

Una semana de contenido con +100 sesiones educativas, consultorios, +10 workshops Premium, Hackaton, EXPO, Networking Hall y mucho más!

Top Solution Authors
Top Kudoed Authors
Users online (829)