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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
Anonymous
Not applicable

Want to calculate the procentage between two column values

Hi!

I have tried alot of stuff with trial and error without success.

I want to calculate the procentage of two values. Example below:

danzlo94_1-1650962771423.png

 

Her i want to calculate how much in procentage i have left on safety stock.
If we divide Avail Qty / Safety Stock (Q) = 320*2400 = 0,13 or 13% that means that we are -87% from the safety stock amount which is correct.

However, when i have more than one value as can be seen below:

danzlo94_2-1650962881621.png

the procentage adds into a total procentage. What i want is to only calculate Avail Qty / Safety Stock (Q) = 201/300 = 0,67 or 67% and then be able to vizualize whats left in other words 0,33 or -33%


My calculated column for the safety stock table:

Safety Stock % = IF(INVENTORY_CURRENT[Safety stock]=0,1,INVENTORY_CURRENT[AvailableQuantity]/INVENTORY_CURRENT[Safety stock])-1

Hope that the information helps and that someone can aid me.

Kind Regards
1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Anonymous ,

 

Calcualted column will show total only based on easy aggregation logic like SUM/AVG... and so on.

I suggest you to create a measure to achieve your goal.

Safety Stock % = 
DIVIDE(SUM('INVENTORY_CURRENT'[Avail Qty]),MAX('INVENTORY_CURRENT'[Safety stock (Q)])) - 1

Result is as below.

RicoZhou_0-1651211744759.png

 

Best Regards,
Rico Zhou

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
varunsabu
New Member

Please try the following measure

varunsabu_0-1651216209426.png

 

Anonymous
Not applicable

Hi @Anonymous ,

 

Calcualted column will show total only based on easy aggregation logic like SUM/AVG... and so on.

I suggest you to create a measure to achieve your goal.

Safety Stock % = 
DIVIDE(SUM('INVENTORY_CURRENT'[Avail Qty]),MAX('INVENTORY_CURRENT'[Safety stock (Q)])) - 1

Result is as below.

RicoZhou_0-1651211744759.png

 

Best Regards,
Rico Zhou

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.