Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code FABINSIDER for a $400 discount.
Register nowThe Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.
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... Thanks in advance.
Solved! Go to Solution.
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]
@andre @Seth_C_Bauer 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.
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]
Perfect. Thanks. That's simple enough. I was convinced that I had to use some type of built in function to do a calculation.
@Seth_C_Bauer 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.
@andre - Whoop, glossed over this one a little to quickly. Yep, you're right. Thanks for pointing this out.
you can do this by building up a final measure by utlizing two hidden measures.
Create and Hide these measures
Measure1 := SUM([Qty on Hand])
Measure2 := SUM([Unit Cost])
Final measure
Measure3 := Measure1 * Measure2
@andre @Seth_C_Bauer 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.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the February 2025 Power BI update to learn about new features.
If you love stickers, then you will definitely want to check out our Community Sticker Challenge!
User | Count |
---|---|
84 | |
69 | |
68 | |
39 | |
37 |