Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi,
I have this source tab example:
date | branch | increment |
1.4.2020 | A | 0 |
1.4.2020 | B | 2 |
1.4.2020 | C | 21 |
2.4.2020 | A | 5 |
2.4.2020 | B | 9 |
2.4.2020 | C | 4 |
3.4.2020 | A | 12 |
3.4.2020 | B | 3 |
3.4.2020 | C | 7 |
I can't find right approach to Calculate Cumulative SUM of column [increment] on daily base, for each branch independently. My targeted table is based on this algorithm for new Column [Totals]:
- Earlier day in the table for [branch] value , then [Totals]= [increment]
- another day after the Earlier day for [branch] value, then [Totals]= Current [increment] + previous value in [Totals]
date | branch | increment | Totals |
1.4.2020 | A | 0 | 0 |
1.4.2020 | B | 2 | 2 |
1.4.2020 | C | 21 | 21 |
2.4.2020 | A | 5 | 5 |
2.4.2020 | B | 9 | 11 |
2.4.2020 | C | 4 | 25 |
3.4.2020 | A | 12 | 17 |
3.4.2020 | B | 3 | 12 |
3.4.2020 | C | 7 | 11 |
Thx for a help, I learn quickly.
Solved! Go to Solution.
got it by my self:
cumulative. The adjective cumulative describes the total amount of something when it's all added together. ... The cumulative snowfall for the whole winter isn't just the amount of snow that fell in one month, but rather the number of inches that fell every month that winter to get the total, cumulative, amount.
@Anonymous , no doubt about your description of the "cumulative" adjective
what is in line with my "expected" target algorithm:
In the new column I need calculate cumulative sum of all incremental values for each row defined by date
from beginning (very first date) to end (very last date)
then, follow your description:
I need calclutate cumulative "snowfall" for each day of the winter based on daily increments = sum of snowfall till each day (defined by rows)
clear?
got it by my self:
@jeyare ,
Try like
Cumm Total = CALCULATE(SUM(Table[increment]),filter(all(Table),Table[date] <=max(Table[date]) && Table[branch] =max(Table[branch])))
Or
Cumm Total = CALCULATE(SUM(Table[increment]),filter(allselected(Table),Table[date] <=max(Table[date]) && Table[branch] =max(Table[branch])))
thx, but doesn't work
ALL also ALLSELECTED
provide for each row in the new column same value 32
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
117 | |
104 | |
77 | |
73 | |
52 |
User | Count |
---|---|
145 | |
109 | |
109 | |
90 | |
64 |