cancel
Showing results for
Did you mean:

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Helper II

## Moving Average of sales

Hello ,

I need dax of moving average of sales .

Example: below sales is apr and may (1657 & 1993 Avg =1825)

same for apr+may+june (1657+1993+4780=2810)

i need same calculation for all the month .

Filter = FY year.

 month Sales average apr 1657 1657 may 1993 1825 june 4780 2810

Kindly help for creating Dax.

1 ACCEPTED SOLUTION
Super User

@Rajendrabobade , if you have date. With help from date table

Cumm Avg= divide( CALCULATE(SUM(Sales[Sales Amount]),filter(allselected(date),date[date] <=max(date[date]))) ,
CALCULATE(distinctcount(Date[Month-Year]),filter(allselected(date),date[date] <=max(date[date])), not(isblank(Sales[Sales Amount]))))

To get the best of the time intelligence function. Make sure you have a date calendar and it has been marked as the date in model view. Also, join it with the date column of your fact/s. Refer :radacad sqlbi My Video Series Appreciate your Kudos.

3 REPLIES 3
Super User

could  you please provide the sample data?

Proud to be a Super User!

Super User

@Rajendrabobade , if you have date. With help from date table

Cumm Avg= divide( CALCULATE(SUM(Sales[Sales Amount]),filter(allselected(date),date[date] <=max(date[date]))) ,
CALCULATE(distinctcount(Date[Month-Year]),filter(allselected(date),date[date] <=max(date[date])), not(isblank(Sales[Sales Amount]))))

To get the best of the time intelligence function. Make sure you have a date calendar and it has been marked as the date in model view. Also, join it with the date column of your fact/s. Refer :radacad sqlbi My Video Series Appreciate your Kudos.

Helper II

Hello,

can you please provide me same dax pbix file . so will refer same .

Thank you .

Announcements

#### Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

#### Power BI Monthly Update - August 2024

Check out the August 2024 Power BI update to learn about new features.

#### Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

#### Fabric Community Update - September 2024

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

Top Solution Authors
Top Kudoed Authors