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
MarkSL
Helper V
Helper V

Measure to show monthly total against each date row

Hi,

 

I need to be able to show the monthly total of Sales Amount against each individual date in a table.  So for example, if Sales Amount was 10 for each day in January, the monthly toal would be 310 and should be reported against each row:

 

DATE           Sales Amount        MonthlyTotal
01/01/18      10                           310
02/01/18      10                           310
03/01/18      10                           310
04/01/18      10                           310
05/01/18      10                           310

So I essentially want to ignore the filter on day but keep that of Year and Month, something along the lines of:

 

Sales Monthly = CALCULATE(Sales[Sales Amount], ALL('Date'[Calendar Year], 'Date'[Month]))

However this does not work.  Please see basic example at the below link:

 

https://www.dropbox.com/s/7o6zvymfilmp3es/Monthly%20Sales%20Query.pbix?dl=0

 

I am sure this should be very simple, but I my Dax is not on form today!

 

Thanks

 

Mark

 

 

 

I have also tried

1 ACCEPTED SOLUTION
Ashish_Mathur
Super User
Super User

Hi,

 

You may download my PBI file from here.

 

Hope this helps.

 

Untitled.png


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

View solution in original post

3 REPLIES 3
Ashish_Mathur
Super User
Super User

Hi,

 

You may download my PBI file from here.

 

Hope this helps.

 

Untitled.png


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Perfect, thank you both for your help.

 

 

Sales Monthly = TOTALMTD(Sales[Sales Amount], ENDOFMONTH('Date'[Date]))

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.