Forum Discussion
Robin96
2 years agoHelper II
Calculation if ID match
Hey all, i need to create a calculation that substract an amount from table1 from table2. (Amount from table1 - amount from table2). This should be based on if the ID's match. So if Reference ID f...
ryan_mayu
2 years agoSuper User
create relationship between two tables and create two columns
Column = RELATED('Table 1'[reference id])+0
Column 2 = if(ISBLANK(sumx(FILTER('Table 1','Table 2'[id]='Table 1'[reference id]),'Table 1'[amount])),0,'Table 2'[amount]-sumx(FILTER('Table 1','Table 2'[id]='Table 1'[reference id]),'Table 1'[amount]))
pls see the attachment below
Robin96
2 years agoHelper II
Hey, Thanks for the response! There is no relation between these two ID's in the original semantic model. They both relate to the date table i have. Is there a way to add this link with for example TREATAS in the column syntax?