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
Anonymous
Not applicable

Sum column on last day of month

Hi,

 

I want to sum up the numbers in the column ActiveLast30ChargeAndDrive on the last day of every month. The highlighted rows are all on the last day of january 2018. How can I create a measure to calculate the sum  of these rows for every last day of the months?

 

 

Capture.PNG

 

BR Lars

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Anonymous , Try closingbalancemonth, with date table

https://docs.microsoft.com/en-us/dax/closingbalancemonth-function-dax

 

closingbalancemonth(sum(Table[value]), date[date])

 

You refer to this video if needed -https://www.youtube.com/watch?v=yPQ9UV37LOU

 

 

View solution in original post

2 REPLIES 2
v-yangliu-msft
Community Support
Community Support

Hi  @ Arnis_88 ,

Here are the steps you can follow:

1. Create a measure.

Measure =
CALCULATE(
    SUM('Table'[ActiveLast30ChargeAndDrive]),
    FILTER('Table',
    'Table'[DateKey]=ENDOFMONTH('Table'[DateKey])))

2. Result.

v-yangliu-msft_0-1603415530667.jpeg

You can downloaded PBIX file from here.

 

Best Regards,

Liu Yang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

amitchandak
Super User
Super User

@Anonymous , Try closingbalancemonth, with date table

https://docs.microsoft.com/en-us/dax/closingbalancemonth-function-dax

 

closingbalancemonth(sum(Table[value]), date[date])

 

You refer to this video if needed -https://www.youtube.com/watch?v=yPQ9UV37LOU

 

 

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.