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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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