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
deeptigeorge
Frequent Visitor

Month to Date summation in DAX

Input Output
DateNo.of bookings DateNo.of bookingsBookings from month to date
1/1/2018224 1/1/2018224224
1/2/2018456 1/2/2018456680
1/3/2018345 1/3/20183451025
1/4/2018343 1/4/20183431368
1/5/2018654 1/5/20186542022
1/6/2018134 1/6/20181342156
1/7/2018876 1/7/20188763032
1/8/2018342 1/8/20183423374



I want to calculate the sum of bookings for each date from the begining of the month in a new column. In the new column every row will have an aggregated value of bookings from the month start to that date.There will be data for a number of months in a number of years. please help with DAX query.

1 ACCEPTED SOLUTION
quentin_vigne
Solution Sage
Solution Sage

Hi @deeptigeorge

 

Can you try this ? 

 

Bookings from month to date =
CALCULATE (
    SUM (YourTable[No.of bookings),
    ALL ( YourTabke),
    YourTable[Date] <= EARLIER (yourTable[Date])
)

- Quentin

View solution in original post

1 REPLY 1
quentin_vigne
Solution Sage
Solution Sage

Hi @deeptigeorge

 

Can you try this ? 

 

Bookings from month to date =
CALCULATE (
    SUM (YourTable[No.of bookings),
    ALL ( YourTabke),
    YourTable[Date] <= EARLIER (yourTable[Date])
)

- Quentin

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.