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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Anonymous
Not applicable

Replicate Excel formula in Power BI for adding data from multple rows together

We are looking to replcate a process we used in Excel and have it work in Power BI.

 

Cell E2 = 4 + D2

*NOTE: This formula is meant to say we had 4 people on the 23, but we do not display that and we want to add that to the 1 person on the 24 for a total of 5 active student cases.

 

Cell E3 = ( E2 + D3 ) - F3

*NOTE: This formual is repeated for all other rows. It says that we take the active cases from the pervious day (E2) add in the new cases from today (D3) and subtract any recovered cases from today (F3).

 

We repeat this process for Employees.  Then, add the active student cases to the active employee cases to create the total active cases for the day (J2)

 

Cell J2 = E2 + E6.

 

The end result does not have to be formatted like the table below, but we want to be able to use the dayily total active cases in a Card. And, we would prefer to only enter in the new and recovered cases and have everything else calculate in Power BI.

 

 ABCDEFJ
1TermCommunity MemberDateNewActiveRecoveredTotal Active
2Fall 2020Student8/24/20201509
3Fall 2020Student8/25/20201608
4Fall 2020Student8/26/202039011
5Fall 2020Student8/27/202009011
6Fall 2020Employee8/24/2020040 
7Fall 2020Employee8/25/2020022 
8Fall 2020Employee8/26/2020020 
9Fall 2020Employee8/27/2020020 
1 REPLY 1
amitchandak
Super User
Super User

@Anonymous , Please try a new column in DAX like

sumx(filter(Table, [Date] = earlier([Date])), [Active])

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
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

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