Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
momedina
Frequent Visitor

Power BI

I have a very simple table with two columns. Date, and Daily Events. The data comes a Big Data DB. The events are already aggregated per day but I want to run a cummulative total. The DAX CALCULATE function does not work since none of the two columns are expressions. I even separated the date into another table that has only Dates. So here is the way the data looks

 

Date                           NumberOfDailyEvents

2017-10-26                                      207294

2017-10-27                                      339522

2017-10-28                                      221002

        .                                                    .

        .                                                    .

 

I hope you get the picture. Now, I thought the calculate function should look something like this:

CALCULATE (
    [NumberOfDailyEvents],
    FILTER (
        ALL ( 'Date'[Date] ),
        'Date'[Date] <= MAX ( 'Date'[Date] )

 

Can anybody please tell me what do I need to make this thing work (The NumberOfDailyEvents] is not a measure like I said, it comes directly from a DB.

 

thanks

1 REPLY 1
d_gosbell
Super User
Super User

Since NumberOfDailyEvents is a column you will just need to provide an aggregate function like SUM() to tell the tabular engine how to aggregate the values.

 

eg.

 

CALCULATE (
    SUM([NumberOfDailyEvents]),
    FILTER (
        ALL ( 'Date'[Date] ),
        'Date'[Date] <= MAX ( 'Date'[Date] )
    )
)

 

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.