Can you please help how to achieve this using DAX?
Column A | Column B |
10 | =10 |
12 | 12 - Sum(Previous Output) = 12 - 10 = 2 |
13 | 13 - Sum(Previous Output) = 13 - (2 + 10) = 1 |
14 | 14 - Sum(Previous Output) = 14 - (1 + 2 + 10) = 1 |
Solved! Go to Solution.
you can try to create an index column in PQ
then use DAX to create columns
Column = if('Table'[Index]=1,'Table'[columnA],'Table'[columnA]-maxx(FILTER('Table','Table'[Index]=EARLIER('Table'[Index])-1),'Table'[columnA]))
Column 2 = if('Table'[Index]=1,'Table'[columnA],'Table'[columnA]-sumx(FILTER('Table','Table'[Index]<EARLIER('Table'[Index])),'Table'[Column]))
pls see the attachment below
Proud to be a Super User!
you can try to create an index column in PQ
then use DAX to create columns
Column = if('Table'[Index]=1,'Table'[columnA],'Table'[columnA]-maxx(FILTER('Table','Table'[Index]=EARLIER('Table'[Index])-1),'Table'[columnA]))
Column 2 = if('Table'[Index]=1,'Table'[columnA],'Table'[columnA]-sumx(FILTER('Table','Table'[Index]<EARLIER('Table'[Index])),'Table'[Column]))
pls see the attachment below
Proud to be a Super User!