Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount.
Register nowGet certified as a Fabric Data Engineer: Check your eligibility for a 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700. Get started
Say I have the following table(I will call it 'Schools'):
School | Week | Pickups |
Harbor Elementary | 1 | 43 |
Harbor Elementary | 2 | 21 |
Harbor Elementary | 3 | 65 |
Harbor Elementary | 4 | 34 |
Sinclair Elementary | 1 | 24 |
Sinclair Elementary | 2 | 16 |
I want to see if I could create a 'running total' column(or measure if that's easier) based on the 'School' and 'Weeks' column, so it would look something like this:
School | Week | Pickups | Running Total Pickups |
Harbor Elementary | 1 | 43 | 43 |
Harbor Elementary | 2 | 21 | 64 |
Harbor Elementary | 3 | 65 | 129 |
Harbor Elementary | 4 | 34 | 163 |
Sinclair Elementary | 1 | 24 | 24 |
Sinclair Elementary | 2 | 16 | 40 |
How would I go about doing that?
Solved! Go to Solution.
Hey @Anonymous ,
try the following measure, that should do it:
Running Total Pickups =
VAR vLastWeek = MAX( Schools[Week] )
RETURN
CALCULATE(
SUM( Schools[Pickups] ),
Schools[Week] <= vLastWeek
)
Hey @Anonymous ,
try the following measure, that should do it:
Running Total Pickups =
VAR vLastWeek = MAX( Schools[Week] )
RETURN
CALCULATE(
SUM( Schools[Pickups] ),
Schools[Week] <= vLastWeek
)
That worked! Thank you!
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.
If you love stickers, then you will definitely want to check out our Community Sticker Challenge!
User | Count |
---|---|
146 | |
72 | |
63 | |
52 | |
51 |
User | Count |
---|---|
208 | |
91 | |
62 | |
59 | |
56 |