I am trying to write a DAX measure in PowerBI that essentially is trying to do the following in sudocode:
Where A is the data table and a is a row element of A.
SUMX(A,
SUMX(A,
a_outer - a_inner
)
)
My best attempts have been to use the EARLIER function though I understand this is mostly meant for calculated columns and have been unable to get this to work.
Any help would be appreciated
Thanks

