Forum Discussion
chrisgehm
9 years agoHelper III
Divide 2 columns
Hi! I've got a simple table in excel, where I have Name, Amount1 and Amount2 I need to show in PBI the diference betwen both and after that, I need to divide the diference with Amount1. Th...
- 9 years ago
You need to use only MEASURES for this! :smileyhappy:
Amt1 Total = SUM('Table'[Amount1]) Amt2 Total = SUM('Table'[Amount2]) Difference = [Amt1 Total] - [Amt2 Total] Divide = DIVIDE ( [Difference], [Amt1 Total], 0 )
chrisgehm
9 years agoHelper III
Anonymous
This is the excel
This is what I have in PBI:
Do you know why the division is not correct?
Sean
9 years agoCommunity Champion
You need to use only MEASURES for this! :smileyhappy:
Amt1 Total = SUM('Table'[Amount1])
Amt2 Total = SUM('Table'[Amount2])
Difference = [Amt1 Total] - [Amt2 Total]
Divide = DIVIDE ( [Difference], [Amt1 Total], 0 )- Anonymous9 years agoNot applicable
which would have been my solution too. You were faster :manhappy:
- Anonymous6 years agoNot applicable
I have 2 columns Im using for calcluation: Crashes, TotalInstalls
Using the syntax posted, I get an error:
Amt1 Total = SUM('PerCapita30'[Crashes])Amt2 Total = SUM('PerCapita30'[TotalInstalls])Difference = [Amt1 Total] - [Amt2 Total]Divide = DIVIDE ( [Difference], [Amt1 Total], 0 )T
Sean wrote:You need to use only MEASURES for this! :smileyhappy:
Amt1 Total = SUM('Table'[Amount1]) Amt2 Total = SUM('Table'[Amount2]) Difference = [Amt1 Total] - [Amt2 Total] Divide = DIVIDE ( [Difference], [Amt1 Total], 0 )
he syntax for 'Amt2' is incorrect. (DAX(SUM('PerCapita30'[Crashes])Amt2 Total = SUM('PerCapita30'[TotalInstalls])