March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
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
User | Count |
---|---|
117 | |
77 | |
58 | |
52 | |
46 |
User | Count |
---|---|
171 | |
117 | |
63 | |
57 | |
51 |