This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. We're covering it all. You won't want to miss it.
Learn moreLevel up your Power BI skills this month - build one visual each week and tell better stories with data! Get started
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
Solved! Go to Solution.
Hi @Syndicate_Admin ,
I created some data:
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])))
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])
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))
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
Thank you very much, I will be implementing to test it.
Hi @Syndicate_Admin ,
I created some data:
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])))
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])
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))
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
Hi,
Share some data and show the expected result.
Check out the April 2026 Power BI update to learn about new features.
Sign up to receive a private message when registration opens and key events begin.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
| User | Count |
|---|---|
| 39 | |
| 28 | |
| 27 | |
| 22 | |
| 18 |
| User | Count |
|---|---|
| 67 | |
| 37 | |
| 32 | |
| 26 | |
| 25 |