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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
sivasrao
Helper III
Helper III

Sales per Month with Year

Hi All,

How can I calculate the year-wise "Sales per Month"?

The below table is the source table.

 

Sales per month source.jpg

The Target Table is 

Sales per month target.jpg

Thank you in advance.

Note: "---" means the value is present. just for a brief explanation, I have used the "---" symbol in the target table.

1 ACCEPTED SOLUTION

Finally, I got a logic for this requirement.

Step 1:

Month Year = FORMAT(sales(Sales Date),"mmm-yyyy")

Step 2:

SalesPerMonth = CALCULATE(SUM(Sales[Amount]),
                           FILTER('Sales',(Sales[Month Year]=EARLIER(Sales[Month Year]))
                           ))
Thank you for all.

Note: This is a new Column only. Not a measure.

View solution in original post

4 REPLIES 4
AbbasG
Memorable Member
Memorable Member

Thank you. It is working.

Is there any chance to create "sales per month" as a new column? what is the logic for that?

Output like,

New Microsoft Word Document_4.jpg

Finally, I got a logic for this requirement.

Step 1:

Month Year = FORMAT(sales(Sales Date),"mmm-yyyy")

Step 2:

SalesPerMonth = CALCULATE(SUM(Sales[Amount]),
                           FILTER('Sales',(Sales[Month Year]=EARLIER(Sales[Month Year]))
                           ))
Thank you for all.

Note: This is a new Column only. Not a measure.

I used this logic,

Untitled.jpg

 
But I am getting total sales per month irrespective of year.
It means, getting the same value in May 2018 and May 2019, Aug 2018 and Aug 2019, etc.
 
 

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.