Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hello,
Sorry if this is a very simple question, but hope somebody can help me.
I'm trying to add a new calculated column in a table to calculate 'Total Cost Of sales'. The formula I have is:
= ["Quantity_Ordered] * [Standard_Cost_Per_Case]
The formula is accepted but every line calculates to 0
What am I doing wrong? I'm new to Power BI and am basically an excel user. It the syntax of the formula wrong?
Hope somebody can help?
Thanks
Pete
Solved! Go to Solution.
Thanks Johanno.
My fault!
I think the problem is not BI related but the raw data source.....One of the columns has not been populated yet for September, so is appearing as 0. Obviusly anything multiplied by zero = zero!!!!
Pete
It should work for both when it's in the same table, but I think best practise is to also specify the table names in the formulas and not only the column name e.g. Total=TableName[Quantity_Ordered]*TableName[Standard_Cost_Per_Case]
Also, I note that you have a " before Quantity if that has something to do with it.
Thanks Johanno.
My fault!
I think the problem is not BI related but the raw data source.....One of the columns has not been populated yet for September, so is appearing as 0. Obviusly anything multiplied by zero = zero!!!!
Pete
It’s hard to say why you are getting zeros, but have a look at my article here.
https://exceleratorbi.com.au/calculated-columns-vs-measures-dax/
There is a lot of beginners info here https://exceleratorbi.com.au/knowledge-base/
Thanks Matt
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
106 | |
104 | |
77 | |
68 | |
61 |
User | Count |
---|---|
148 | |
107 | |
106 | |
82 | |
70 |