cancel
Showing results for 
Search instead for 
Did you mean: 

Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.

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
PBI November 2023 Update Carousel

Power BI Monthly Update - November 2023

Check out the November 2023 Power BI update to learn about new features.

Community News

Fabric Community News unified experience

Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.

Power BI Fabric Summit Carousel

The largest Power BI and Fabric virtual conference

130+ sessions, 130+ speakers, Product managers, MVPs, and experts. All about Power BI and Fabric. Attend online or watch the recordings.

Top Solution Authors
Top Kudoed Authors