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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
Anonymous
Not applicable

Dax - Sum values by date

Hi team,

I have Date and Value columns coming from one table, and I need a new calculated column to show the total sum of the values by date.

Date&Time

Value

Needed result (SUM by date)

Result #2

01.01.2022 12:01:00 AM

5

 

15

01.01.2022 15:00:00 PM

10

15

15

02.02.2022 01:00:00 AM

20

 

50

02.02.2022 05:00:00 AM

20

 

50

02.02.2022 10:00:00 PM

10

50

50

03.02.2022 11:00:00 AM

2

 

5

03.02.2022 11:15:00 AM

3

5

5

 

I tried this Dax calculation, but it didn’t work:
Total_SUM = CALCULATE (SUM ( ‘Table1[Value]), FILTER ( ALL ('Table1), ‘Table1[Date&Time] <= MAX (' Table1[Date&Time])))

 

I will appreciate the help.

1 ACCEPTED SOLUTION

@Anonymous So, make the following tweak in that measure:

 Result1= CALCULATE(SUM(TableName[ValuesColumn]),ALLEXCEPT(TableName,TableName[Date_]),TableName[Task Desc]="MO"))

 

 

Don't forget to give thumbs up and accept this as a solution if it helped you!!!

Please take a quick glance at newly created dashboards : Restaurant Management Dashboard , HR Analytics Report , Hotel Management Report, Sales Analysis Report , Fortune 500 Companies Analysis , Revenue Tracking Dashboard

View solution in original post

6 REPLIES 6
miggy46
New Member

This worked for me
Column = CALCULATE(SUM(Table1[Value]),Table1[Date&Time]).

Tahreem24
Super User
Super User

@Anonymous Follow the below steps to get the result.

Step 1: Create below column which only extract the Date part from your date column.

Date_  Column= LEFT(TableName[YourDateColumn],10)
 
Step 2: Create a DAX measure like below:
Result1 = CALCULATE(SUM(TableName[ValuesColumn]),ALLEXCEPT(TableName,TableName[Date_]))
 
Step 3: You'll get the result like below:
Capture.JPG
 
 
Don't forget to give thumbs up and accept this as a solution if it helped you!!!

Please take a quick glance at newly created dashboards : Restaurant Management Dashboard , HR Analytics Report , Hotel Management Report, Sales Analysis Report , Fortune 500 Companies Analysis , Revenue Tracking Dashboard
Anonymous
Not applicable

Hi @Tahreem24 ,

Thank you for your response. As I just mention, currently, I have an additional filter for my whole table (apologies for not mentioning it before). The column is Task Description - "AM", "MO", and my table is filtering to show dates and values only for Task desc. = "MO". 
By using your formula I received the sum of all values for a day (AM & MO). The filter applied to myreport page didn't affect the new Calc. column. 

Is it possible the "New column" to show the sum of values only where the Task Desc = "MO".

Thank you.

@Anonymous So, make the following tweak in that measure:

 Result1= CALCULATE(SUM(TableName[ValuesColumn]),ALLEXCEPT(TableName,TableName[Date_]),TableName[Task Desc]="MO"))

 

 

Don't forget to give thumbs up and accept this as a solution if it helped you!!!

Please take a quick glance at newly created dashboards : Restaurant Management Dashboard , HR Analytics Report , Hotel Management Report, Sales Analysis Report , Fortune 500 Companies Analysis , Revenue Tracking Dashboard
Anonymous
Not applicable

Hi @amitchandak ,

Thank you for your response. Currently, I have an additional filter for my whole table (apologies for not mentioning it before). The column is Task Description - "AM", "MO", and my table is filtering to show dates and values only for Task desc. = "MO". 
By using your formula I received the sum of all values for a day (AM & MO). The filter applied to myreport page didn't affect the new Calc. column. 

Is it possible the "New column" to show the sum of values only where the Task Desc = "MO".

Thank you.

amitchandak
Super User
Super User

@Anonymous , New columns

 


new column =
var _date = datevalue([Date&Time])
return
sumx(filter(Table, datevalue([Date&Time]) = _date ), [Value])

 

 

new column =
var _date = datevalue([Date&Time])
var _max = maxx(filter(Table, datevalue([Date&Time]), [Date&Time])
return
if([Date&Time] =_max, sumx(filter(Table, datevalue([Date&Time]) = _date ), [Value]), blank())

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

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.

Top Solution Authors