I have a billing table
I have a measure
[Billing quantity] =
VAR NumberOfRows = COUNTROWS(‘Billing Table’)
RETURN
SUM(‘Billing Table’,DIVIDE(‘Billing Table’[Quantity],NumberOfRows)
I thought this worked but on finding two sales orders with different quantities this no longer works
The report Shows the calculation at row level.
How do I get the calculation to get the value for each sales order and then add those two values?
I managed to get as far as
VAR Selection =
SUMMARIZECOLUMNS(
‘Billing Table’[Sales Order]
,‘Billing Table’[Quantity]
)
But then I need to reference that to get the SUM of Selection[Quantity] and I can’t figure out that bit.
So if we have ten different quantities it will add the ten,. However I think that if there are 11 sales orders on an Invoice and there are 10 different quantities then it wont work
In order to achieve the results based on the scenario that you’ve provided in your original post. Below is the DAX measure alongwith the screenshot of the final results provided for the reference -