Forum Discussion
cumulative by column
Good morning
I have a table that I indicate below:
| 1 trim | |||
| abs causes | abs hours | Accumulated by columns | accumulated by column to exit |
| Tests | 15 | 20764.37 | 5134.1 |
| enf/fall | 0 | 20764.37 | 5134.1 |
| marriage | 198.42 | 20764.37 | 5134.1 |
| acc | 862.5 | 20764.37 | 5134.1 |
| ENF with low | 3487.5 | 20764.37 | 5134.1 |
| ENF without low | 195.3 | 20764.37 | 5134.1 |
| Move home | 30 | 20764.37 | 5134.1 |
| Cons. doctor | 336.9 | 20764.37 | 5134.1 |
| Inex duty | 8.75 | 20764.37 | 5134.1 |
| nursing | 0 | 20764.37 | 5134.1 |
| 5134.1 | 20764.37 | 5134.1 |
And the column "accumulated by columns" gives me the accumulated in the year with filters applied with segmenters and what I want is that of the total of the column of ABS hours for the quarter as I indicate in the column "accumulated by column that must come out"
The formula I have is:
2 Replies
- AnonymousNot applicable
Hi Syndicate_Admin ,
I created some data:
Added a row for quarters
Here are the steps you can follow:
1. Create calculated column.
If you don't group it, you can accumulate it directly through Index
Column = SUMX( FILTER(ALL('ABSENTEEISM ROWS'), 'ABSENTEEISM ROWS'[Index]<=EARLIER('ABSENTEEISM ROWS'[Index])) ,[abs hours])If you want to group by quarter, you can use EARLIER and Index to accumulate
Column 2 = SUMX( FILTER(ALL('ABSENTEEISM ROWS'), 'ABSENTEEISM ROWS'[Index]<=EARLIER('ABSENTEEISM ROWS'[Index])&&'ABSENTEEISM ROWS'[quarter]=EARLIER('ABSENTEEISM ROWS'[quarter])) ,[abs hours])2. Result:
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
- Syndicate_AdminAdministrator
I think I expressed the problem wrong, the table I indicate is the display table and what I want in the display table is to have the ABS hours by causes and by quarter, so far I have achieved it. What gives me problems is to make a measure so that I get the total hours of absenteeism per quarter without differentiating the causes, that is to say that when putting the measure in the visualization in each cause I got the 5134, 10 to get the percentage. And the measure I have is:
CUMULATIVE HOURS OF ABSENTEEISM BY CAUSAS_FILAS =CALCULATE ([ABS HOURS],ALLSELECTED('ABSENTEEISM')) but this measure divides me the 5134.1 its propocionalidad in each cause that is not what I want.