The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
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.