[TABLE="class: grid, width: 500, align: left"]
<tbody>[TR]
[TD][/TD]
[TD]Table 1[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]RID[/TD]
[TD]Amount[/TD]
[TD]Count[/TD]
[/TR]
[TR]
[TD]Elephant[/TD]
[TD]500[/TD]
[TD]2[/TD]
[/TR]
[TR]
[TD]Lion[/TD]
[TD]600[/TD]
[TD]4[/TD]
[/TR]
[TR]
[TD]Zebra[/TD]
[TD]800[/TD]
[TD]6[/TD]
[/TR]
</tbody>[/TABLE]
[TABLE="class: grid, width: 500, align: left"]
<tbody>[TR]
[TD][/TD]
[TD]Table 2[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]RID[/TD]
[TD]Amount[/TD]
[TD]Count[/TD]
[/TR]
[TR]
[TD]Deer[/TD]
[TD]500[/TD]
[TD]2[/TD]
[/TR]
[TR]
[TD]Lion[/TD]
[TD]800[/TD]
[TD]5[/TD]
[/TR]
[TR]
[TD]Zebra[/TD]
[TD]700[/TD]
[TD]5[/TD]
[/TR]
</tbody>[/TABLE]
Desired Result
[TABLE="class: grid, width: 500, align: left"]
<tbody>[TR]
[TD]RID[/TD]
[TD]Amount[/TD]
[TD]Count[/TD]
[/TR]
[TR]
[TD]Elephant[/TD]
[TD]-500[/TD]
[TD]-2[/TD]
[/TR]
[TR]
[TD]Deer[/TD]
[TD]+500[/TD]
[TD]+2[/TD]
[/TR]
[TR]
[TD]Lion[/TD]
[TD]+200[/TD]
[TD]+1[/TD]
[/TR]
[TR]
[TD]Zebra[/TD]
[TD]-100[/TD]
[TD]-2[/TD]
[/TR]
</tbody>[/TABLE]
RID is the related field
What formula do I use in power query or Power Pivot?
Thanks.
Note Question should be:
<tbody>[TR]
[TD][/TD]
[TD]Table 1[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]RID[/TD]
[TD]Amount[/TD]
[TD]Count[/TD]
[/TR]
[TR]
[TD]Elephant[/TD]
[TD]500[/TD]
[TD]2[/TD]
[/TR]
[TR]
[TD]Lion[/TD]
[TD]600[/TD]
[TD]4[/TD]
[/TR]
[TR]
[TD]Zebra[/TD]
[TD]800[/TD]
[TD]6[/TD]
[/TR]
</tbody>[/TABLE]
[TABLE="class: grid, width: 500, align: left"]
<tbody>[TR]
[TD][/TD]
[TD]Table 2[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]RID[/TD]
[TD]Amount[/TD]
[TD]Count[/TD]
[/TR]
[TR]
[TD]Deer[/TD]
[TD]500[/TD]
[TD]2[/TD]
[/TR]
[TR]
[TD]Lion[/TD]
[TD]800[/TD]
[TD]5[/TD]
[/TR]
[TR]
[TD]Zebra[/TD]
[TD]700[/TD]
[TD]5[/TD]
[/TR]
</tbody>[/TABLE]
Desired Result
[TABLE="class: grid, width: 500, align: left"]
<tbody>[TR]
[TD]RID[/TD]
[TD]Amount[/TD]
[TD]Count[/TD]
[/TR]
[TR]
[TD]Elephant[/TD]
[TD]-500[/TD]
[TD]-2[/TD]
[/TR]
[TR]
[TD]Deer[/TD]
[TD]+500[/TD]
[TD]+2[/TD]
[/TR]
[TR]
[TD]Lion[/TD]
[TD]+200[/TD]
[TD]+1[/TD]
[/TR]
[TR]
[TD]Zebra[/TD]
[TD]-100[/TD]
[TD]-2[/TD]
[/TR]
</tbody>[/TABLE]
RID is the related field
What formula do I use in power query or Power Pivot?
Thanks.
Note Question should be:
Calculate The Difference Between two Fields in Two Related Tables
Last edited: