Forum Discussion
Column is not showing correct value
Hi all,
I have price and quantity columns in my report. I have calculated sales by multiplying price and quantity. When i am multiplying them in a measure, the sale value is showing correctly. But when multiplying them in a column, the sales value is incorrect.
5 Replies
- parry2kSuper User
AishwariyaV can yu share the expression you use for column? Do you have aggregation on column when you dropped it in table visual?
- AishwariyaVHelper IVsale = (Order_Details[Quantity])*(Order_Details[UnitPrice])
- sdjensenSolution Sage
As I see it both your column and measure is wrong - look at the total of your measure it's calculated as the sum of all UnitPrice and sum of all Quantity - to fix this you should use
sumx(TableName', 'TableName'UnitPrice * 'TableName'Quantity)
- AishwariyaVHelper IVColumn 4 = sumx('Order_Details', 'Order_Details'[UnitPrice] * Order_Details[Quantity])It it showing incorrect value even after using sumx
- AnonymousNot applicable
HI AishwariyaV ,
Actually, when you use measure in a calculated column, its calculation result will been fixed as static value and did not dynamic changes based on current row contents.(measure row content will be fixed as whole table)
Please use measure to calculate with formulas who invoke both column and measures.
Regards,
Xiaoxin Sheng