Forum Discussion
aditidhooria
9 years agoFrequent Visitor
Comparing columns in two different tables
I have a table named Sales Transaction in which I have two fields : Revenue Amount and Cost Amount. I need to calculate Gross Margin (GM) which is the difference of Revenue Amount and Cost Amount usi...
- 9 years ago
Firstly, make sure you write a measure and not a column. Read about that here http://exceleratorbi.com.au/calculated-columns-vs-measures-dax/
A measure something like this should do it.
GM = sumx(Sales,Sales[Revenue] -Sales[Cost])
MattAllington
9 years agoCommunity Champion
Firstly, make sure you write a measure and not a column. Read about that here http://exceleratorbi.com.au/calculated-columns-vs-measures-dax/
A measure something like this should do it.
GM = sumx(Sales,Sales[Revenue] -Sales[Cost])
- aditidhooria9 years agoFrequent VisitorThanks Matt for the quick response. I am trying the same.