cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
deeptigeorge Frequent Visitor
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

Accepted Solutions
Highlighted
quentin_vigne Senior Member
Senior Member

Re: Month to Date summation in DAX

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

1 REPLY 1
Highlighted
quentin_vigne Senior Member
Senior Member

Re: Month to Date summation in DAX

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
Virtual Launch Event

Microsoft Business Applications October Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

Summit North America

Power Platform Summit North America

Register by September 5 to save $200

PBI Community Highlights

PBI Community Highlights

Check out what's new in the Power BI Community!

MBAS Gallery

Watch Sessions On Demand!

Continue your learning in our online communities.

Top Kudoed Authors
Users Online
Currently online: 220 members 2,025 guests
Please welcome our newest community members: