How to delete a constant number continously in DAX

Hi ,

I wanted to calculate the below senario through DAX so it will be dynamic.

I have two table table1 and table 2 both are disconnected.
Table1 has
Value
5
10
20

Table2 has
Value
50

Now i want to delete table2 from table1
And expecting below output"

result
50-5=45
45-10=35
35-20=15

the subtract should happen on the previous obtain number.

Pls ,guide me .
Thanks,
Anurag

Hi @Anurag,

Your requirement isn’t very clear but give this a go and see if it gets you there:
I started with the 2 tables you’ve described, both have 1 column called “Value”.

I hope this is helpful.

1 Like

Thanks for the answerer, I am also trying to use Earlier but getting some error .
Just one question how your earlier function get the context of table1.

Pls , enlighten me about this .

Thanks,
Anurag

Hi @Anurag,

I guess you are trying to write a measure… if so, try this

image