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

Level up your Power BI skills this month - build one visual each week and tell better stories with data! Get started

Reply
Syndicate_Admin
Administrator
Administrator

Total monthly sales

Hello community. I am new to Power BI, I need to calculate the total amount of sales made in each month, my table is 3 months old and the sales generated in those three months. You can tell me how I can do that. Thank you

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi  @Syndicate_Admin ,

I created some data:

vyangliumsft_0-1654581236847.png

Here are the steps you can follow:

1. Create calculated column.

Year = YEAR('Table'[Date])
Month = MONTH('Table'[Date])

2. Create measure.

total amount of sales made in each month =
CALCULATE(SUM('Table'[Amount]),FILTER(ALL('Table'),'Table'[Year]=MAX('Table'[Year])&&'Table'[Month]=MAX('Table'[Month])))

vyangliumsft_1-1654581236847.png

If you want to get the amount of all dates in the entire table, you can use the following function:

sales generated in those three months =
SUMX(ALL('Table'),[Amount])

vyangliumsft_2-1654581236849.png

If you want to get the total for a given three months:

You can use [Month] as a slicer to specify which three consecutive months.

Slicer_amount =
var _min=MINX(ALLSELECTED('Table'),[Month])
var _max=MAXX(ALLSELECTED('Table'),[Month])
return
CALCULATE(SUM('Table'[Amount]),FILTER(ALL('Table'),'Table'[Month]>=_min&&'Table'[Month]<=_max))

vyangliumsft_3-1654581236851.png

 

Best Regards,

Liu Yang

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

3 REPLIES 3
Syndicate_Admin
Administrator
Administrator

Thank you very much, I will be implementing to test it.

Anonymous
Not applicable

Hi  @Syndicate_Admin ,

I created some data:

vyangliumsft_0-1654581236847.png

Here are the steps you can follow:

1. Create calculated column.

Year = YEAR('Table'[Date])
Month = MONTH('Table'[Date])

2. Create measure.

total amount of sales made in each month =
CALCULATE(SUM('Table'[Amount]),FILTER(ALL('Table'),'Table'[Year]=MAX('Table'[Year])&&'Table'[Month]=MAX('Table'[Month])))

vyangliumsft_1-1654581236847.png

If you want to get the amount of all dates in the entire table, you can use the following function:

sales generated in those three months =
SUMX(ALL('Table'),[Amount])

vyangliumsft_2-1654581236849.png

If you want to get the total for a given three months:

You can use [Month] as a slicer to specify which three consecutive months.

Slicer_amount =
var _min=MINX(ALLSELECTED('Table'),[Month])
var _max=MAXX(ALLSELECTED('Table'),[Month])
return
CALCULATE(SUM('Table'[Amount]),FILTER(ALL('Table'),'Table'[Month]>=_min&&'Table'[Month]<=_max))

vyangliumsft_3-1654581236851.png

 

Best Regards,

Liu Yang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

Ashish_Mathur
Super User
Super User

Hi,

Share some data and show the expected result.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

Check out the April 2026 Power BI update to learn about new features.

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.