Forum Discussion
Divide 2 columns
- 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 )
Hi chrisgehm
It's a bit hard to answer your question without a pic of the data at least.
I assume you tried to solve your problem in DAX?
Anonymous
This is the excel
This is what I have in PBI:
Do you know why the division is not correct?
- Sean9 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:
- Sean9 years agoCommunity Champion
You will get the values per name in the Table - you have the names on the Rows! :smileyhappy:
- 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])
- Anonymous9 years agoNot applicable
mhhh, worked with your example on the pics, worked fine...
How did you create the measures value1, value2 and differene