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

Next up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now

Reply
krishb1414
Helper III
Helper III

Sum of values of same date

Hi Everyone,

 

I need to do sum of count column and result will be shown as final column.

If there is any 2 same dates then count column will do sum else returns count column value.

Can anyone help ?

krishb1414_0-1691411796947.png

 

2 ACCEPTED SOLUTIONS
DOLEARY85
Resident Rockstar
Resident Rockstar

Hi,

 

try this:

 

Column = CALCULATE(sum('Table'[count]),ALLEXCEPT('Table','Table'[Date]))
 
If I answered your question, please mark my post as solution, Appreciate your Kudos 👍

View solution in original post

Anonymous
Not applicable

Hi @krishb1414 ,

 

You could create a calculated column.

final = CALCULATE(SUM('Table'[count]),FILTER('Table',[Date]=EARLIER('Table'[Date])))

vstephenmsft_0-1691549274226.png

 

                                                                                                                                                         

Best Regards,

Stephen Tao

 

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

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

Hi @krishb1414 ,

 

You could create a calculated column.

final = CALCULATE(SUM('Table'[count]),FILTER('Table',[Date]=EARLIER('Table'[Date])))

vstephenmsft_0-1691549274226.png

 

                                                                                                                                                         

Best Regards,

Stephen Tao

 

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

DOLEARY85
Resident Rockstar
Resident Rockstar

Hi,

 

try this:

 

Column = CALCULATE(sum('Table'[count]),ALLEXCEPT('Table','Table'[Date]))
 
If I answered your question, please mark my post as solution, Appreciate your Kudos 👍
AmiraBedh
Super User
Super User

Based on your dataset :

 

DateTable =
DATATABLE (
"Date", DATETIME,
"count", DOUBLE,
{
{ "01/08/2023", 0.5 },
{ "01/08/2023", 0.5 },
{ "02/08/2023", 0.5 },
{ "02/08/2023", 0.5 },
{ "03/08/2023", 0.5 },
{ "04/08/2023", 0.5 },
{ "04/08/2023", 0.5 }
}
)

Create a summarized table like below : 

SummarizedTable =
    SUMMARIZE (
        DateTable,
        DateTable[Date],
        "Final", IF(COUNTROWS(DateTable) > 1, SUM(DateTable[count]), MIN(DateTable[count]))
    )

Proud to be a Power BI Super User !

Microsoft Community : https://docs.microsoft.com/en-us/users/AmiraBedhiafi
Linkedin : https://www.linkedin.com/in/amira-bedhiafi/
StackOverflow : https://stackoverflow.com/users/9517769/amira-bedhiafi
C-Sharp Corner : https://www.c-sharpcorner.com/members/amira-bedhiafi
Power BI Community :https://community.powerbi.com/t5/user/viewprofilepage/user-id/332696

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.