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
Sophiapan
New Member

Sum Rows data

Hi everyone,

 

I really need your help to solve this. 😫 This is how my data look like:

Sophiapan_3-1640935473173.png

 

I wish to sum each Username's Balance Amount that earlier than or equal to the Transaction Date. If using excel it would be look like this =SUMIFS(C:C,A:A,A2,B:B,"<="&B2)

I wish to find a dax formula that could replace this excel formula.

 

Thank you in advance!

 

2 ACCEPTED SOLUTIONS
amitchandak
Super User
Super User

@Sophiapan , Not very clear

Try a new column like

new column = Sumx(filter(Table, [Username] =earlier([username]) && [Transaction Date] <earlier([Transaction Date])) , [New amount])

 

or use <=

 

 

new column = Sumx(filter(Table, [Username] =earlier([username]) && [Transaction Date] <=earlier([Transaction Date])) , [New amount])

 

if this does not help

Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.

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

View solution in original post

bcdobbs
Community Champion
Community Champion

Try:

 

Measure Name =
VAR SelectedDate = SELECTEDVALUE (Table[Transaction Date] )

 

RETURN

CALCULATE (

    SUM (Table[Net Amount]),
    Table[Transaction Date] <= SelectedDate

)

 

You can then use it in a table visual with username and transaction date.

 

If you want a calculated column in the table it's self let me know.



Ben Dobbs

LinkedIn | Twitter | Blog

Did I answer your question? Mark my post as a solution! This will help others on the forum!
Appreciate your Kudos!!

View solution in original post

2 REPLIES 2
bcdobbs
Community Champion
Community Champion

Try:

 

Measure Name =
VAR SelectedDate = SELECTEDVALUE (Table[Transaction Date] )

 

RETURN

CALCULATE (

    SUM (Table[Net Amount]),
    Table[Transaction Date] <= SelectedDate

)

 

You can then use it in a table visual with username and transaction date.

 

If you want a calculated column in the table it's self let me know.



Ben Dobbs

LinkedIn | Twitter | Blog

Did I answer your question? Mark my post as a solution! This will help others on the forum!
Appreciate your Kudos!!
amitchandak
Super User
Super User

@Sophiapan , Not very clear

Try a new column like

new column = Sumx(filter(Table, [Username] =earlier([username]) && [Transaction Date] <earlier([Transaction Date])) , [New amount])

 

or use <=

 

 

new column = Sumx(filter(Table, [Username] =earlier([username]) && [Transaction Date] <=earlier([Transaction Date])) , [New amount])

 

if this does not help

Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.

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
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.

Top Solution Authors