Forum Discussion
MightyRabbit
3 years agoFrequent Visitor
Query to subtract column from different Table
Dear all, Could you please kindly help with the querry to subtract 1 column from another table. I have "table 1" with Column "No" Like the one below: No A1 A2 A1 A2 A3 ...
- 3 years ago
Hi, MightyRabbit
try to use calculate and all with IF and NOT DAX func
the code will be something like
Result = CALCULATE( IF( NOT(CONTAINS(table2, table2[No_deleted], table1[No])), table1[No], "0" ), ALL(table2) )
rubayatyasmin
3 years agoCommunity Champion
Hi, MightyRabbit
try to use calculate and all with IF and NOT DAX func
the code will be something like
Result =
CALCULATE(
IF(
NOT(CONTAINS(table2, table2[No_deleted], table1[No])),
table1[No],
"0"
),
ALL(table2)
)