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

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

Reply
DimaMD
Solution Sage
Solution Sage

Divide value minus

Hello Community!

 

I have a task to calculate profit of two different types of sellary, and percentage, which every type consist from total amount of profit.

 

The problem is that in some cases we have loss in profit and as a result we have negative balance in total.

When we try to calculate percentage, as a result we divide positive profit and negative total, that is why we get negative percentage.

 

In our desired result we must see that in case where profit in one type of sellary is positive, then the percentage must also be positive. 

 

Please help me to write a mesure which will complete my task


Example table

Type of Sellaryprofitprct profitdesired result
Trading847-0,78%0,78%
Own production-108 802100,78%-100,78%
Total-107 955100,00% 




__________________________________________

Thank you for your like and decision

__________________________________________

Greetings from Ukraine

To help me grow PayPal: embirddima@gmail.com
1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@DimaMD , Use abs in your measure

 

measure =abs([prct profit])

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

1 REPLY 1
amitchandak
Super User
Super User

@DimaMD , Use abs in your measure

 

measure =abs([prct profit])

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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