Forum Discussion
sterry
11 years agoNew Member
Product function in calculated column or measure
How do I add a calculated column that simply is the product of the values in two other columns (Qty on Hand X Unit Cost)? Seems like it should be easy enough to do, but I'm struggling with it... Th...
- 11 years ago
Load your PBIX, and go to your Data and go to the table where the columns are. Click "New Column" and enter the formula:
Inventory Cost =[Qty on Hand] * [Unit Cost]
- 11 years ago
andre Anonymous Instead of calculated column can use Measure:= SUMX( TableName; TableName[Qty on Hand] * TableName[Unit Cost] ) so you can iterate the whole table like a calulated column.
andre
11 years agoMemorable Member
Anonymous i am afraid in this particular case your measure calc will not work. I am not a big fan of calculated columns but in this case, I think that smoupre's solution will work better.
Anonymous
11 years agoNot applicable
andre - Whoop, glossed over this one a little to quickly. Yep, you're right. Thanks for pointing this out.