Don't miss your chance to take exam DP-600 or DP-700 on us!
Request nowLearn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now
Using the following formula for a calculated column:
I am expecting to get 1200/44 = $27.3 for both rows.
Total Freight and Admin column is a simple column taken straigh from a dataset (no calculation there).
Quantity column is summing per transaction.
Any suggestion? @parry2k
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsHey,
my DAX column is looking like this, basically it's quite similar to the DAX statement you provided:
Column =
var theQuantity = SUM('Table2'[quantity])
return
DIVIDE('Table2'[freight],theQuantity)
and my sample data looks like this, also similar to yours, but with your expected result:
So there might be a difference. can you please explain what you mean by "Quantity column is summing by transaction".
If quantity is a column then SUM('tablename'[quantity] will calculate across all rows of the table as there is no filtercontext present.
Regards,
Tom
Hello @ TomMartens I tried the formula but it didn't change the result.
"Quantity column is summing by transaction" - each of those two transactions has multiple lines (13 and 31= 44 as quantity).
By summing I mean if I leave the field as is (Don't summarize) it would show 1 in the column of quantityf for both transactions. Below is the screenshot of it.
| User | Count |
|---|---|
| 50 | |
| 41 | |
| 32 | |
| 14 | |
| 13 |
| User | Count |
|---|---|
| 84 | |
| 72 | |
| 37 | |
| 27 | |
| 24 |