Forum Discussion
andreaturri27
Helper I
4 years agosubtracion row custom column
Hi community, i have this situation i would obtain this result it's possibile? only custom column thank you Regards Andrea
- Anonymous4 years ago
Hi andreaturri27 ,
Here are the steps you can follow:
1. In Power query. Add Column – Index Column – From 1.
2. Create calculated column.
min = var _min=MINX(FILTER(ALL('Table'),'Table'[id_progetto]=EARLIER('Table'[id_progetto])),[Index]) return IF( 'Table'[Index]=_min , [Moltiplicazione], BLANK())Sottazione = CALCULATE( SUM('Table'[min]) - SUM('Table'[h_Prog]), FILTER(ALL('Table'),'Table'[id_progetto]=EARLIER('Table'[id_progetto])&& 'Table'[Index]<=EARLIER('Table'[Index])))3. 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
andreaturri27
Helper I
4 years agohi PabloDeheza the solution dosn't work..
Pippo2 =
SUMX (
FILTER (
Stampa_Ostinelli_PROG,
EARLIER ( Stampa_Ostinelli_PROG[Id_progetto]) = Stampa_Ostinelli_PROG[Id_progetto]
&& EARLIER ( Stampa_Ostinelli_PROG[Indice] ) >= Stampa_Ostinelli_PROG[Indice]
),
Stampa_Ostinelli_PROG[h_prog]
)
error is
EARLIER / EARLIEST refers to a previous row context that does not exist.