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

Get certified in Microsoft Fabric—for free! For a limited time, the Microsoft Fabric Community team will be offering free DP-600 exam vouchers. Prepare 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
OCT PBI Update Carousel

Power BI Monthly Update - October 2024

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

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

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

October NL Carousel

Fabric Community Update - October 2024

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