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

The Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.

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!

Feb2025 Sticker Challenge

Join our Community Sticker Challenge 2025

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

Feb2025 NL Carousel

Fabric Community Update - February 2025

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