Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Marcusdahlberg
Frequent Visitor

Multiply value if a column value is X, otherwise keep it

Hi

 

I have a small issue that hope someone here can help me with.

 

I'm working with a simple excel table that contains sold items and how much discount we have given on each specific produkt.

The items are sold both by unit (1 and 1), but also in boxes/packages (can contain 20 units etc). I have a column that state if it is unit or box (St or Frp). What i would like to do is to make a column that only contain the unit value.

So if the product is sold as a unit (st), then i want to keep the value on how many we sold. But if the sold product is a box, then i want to multiple the amount of boxes with the value from another column that contain the amount of units/box.

Screenshot_2.jpg

Hope you can help me out 🙂

 

Br Marcus

1 REPLY 1
Burningsuit
Resident Rockstar
Resident Rockstar

Hi @Marcusdahlberg 

This is best done in Power Query. In Power BI Desktop, go to "Transform Data" and add a custom column as below...

Burningsuit_0-1643711877737.png

This will generate a new column "Unit Value" with the calculation you need.

Hope this helps

Stuart

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors