Hi,
I'm new to Power BI having come over from the Spotfire world where I would not have this issue.
I have two tables (Main) and (Manufacturing) shown at the bottom of the thread.
I would like to, compute a simple running total/cumulative new column of Rate by ID and Date and end up with a table like the picture shown.
I've tried a few ways, but can't get a proper result and always get the Total of each Name as a single value (202+338+174=604). The "Run Total" column in the manufacturing table shows what I want to achieve, but I want to do it in Power BI. Clearly I'm missing something, but here is the syntax I'm using.
Thanks for your help.
PBI Run Total =
VAR MaxDate = MAX('Manufacturing'[Date])
RETURN
CALCULATE(
SUM(Manufacturing[Rate]),
FILTER(
ALLSELECTED(Manufacturing),
'Manufacturing'[Date]<=MaxDate
)
)
I'm new to Power BI having come over from the Spotfire world where I would not have this issue.
I have two tables (Main) and (Manufacturing) shown at the bottom of the thread.
I would like to, compute a simple running total/cumulative new column of Rate by ID and Date and end up with a table like the picture shown.
I've tried a few ways, but can't get a proper result and always get the Total of each Name as a single value (202+338+174=604). The "Run Total" column in the manufacturing table shows what I want to achieve, but I want to do it in Power BI. Clearly I'm missing something, but here is the syntax I'm using.
Thanks for your help.
PBI Run Total =
VAR MaxDate = MAX('Manufacturing'[Date])
RETURN
CALCULATE(
SUM(Manufacturing[Rate]),
FILTER(
ALLSELECTED(Manufacturing),
'Manufacturing'[Date]<=MaxDate
)
)
ID | Name |
2721 | Alpha |
1223 | Beta |
3451 | Charlie |
ID | Date | Index | Rate | Run Total |
2721 | 1/1/2019 | 1 | 30 | 30 |
2721 | 1/2/2019 | 2 | 31 | 61 |
2721 | 1/3/2019 | 3 | 5 | 66 |
2721 | 1/4/2019 | 4 | 17 | 83 |
2721 | 1/5/2019 | 5 | 11 | 94 |
2721 | 1/6/2019 | 6 | 21 | 115 |
2721 | 1/7/2019 | 7 | 34 | 149 |
2721 | 1/8/2019 | 8 | 15 | 164 |
2721 | 1/9/2019 | 9 | 7 | 171 |
2721 | 1/10/2019 | 10 | 23 | 194 |
2721 | 1/11/2019 | 11 | 8 | 202 |
3451 | 1/1/2019 | 12 | 17 | 17 |
3451 | 1/2/2019 | 13 | 20 | 37 |
3451 | 1/3/2019 | 14 | 27 | 64 |
3451 | 1/4/2019 | 15 | 7 | 71 |
3451 | 1/5/2019 | 16 | 23 | 94 |
3451 | 1/6/2019 | 17 | 18 | 112 |
3451 | 1/7/2019 | 18 | 24 | 136 |
3451 | 1/8/2019 | 19 | 8 | 144 |
3451 | 1/9/2019 | 20 | 5 | 149 |
3451 | 1/10/2019 | 21 | 11 | 160 |
3451 | 1/11/2019 | 22 | 14 | 174 |
1223 | 1/1/2019 | 23 | 25 | 25 |
1223 | 1/2/2019 | 24 | 12 | 37 |
1223 | 1/3/2019 | 25 | 28 | 65 |
1223 | 1/4/2019 | 26 | 12 | 77 |
1223 | 1/5/2019 | 27 | 34 | 111 |
1223 | 1/6/2019 | 28 | 21 | 132 |
1223 | 1/7/2019 | 29 | 22 | 154 |
1223 | 1/8/2019 | 30 | 17 | 171 |
1223 | 1/9/2019 | 31 | 12 | 183 |
1223 | 1/10/2019 | 32 | 19 | 202 |
1223 | 1/11/2019 | 33 | 26 | 228 |