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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Anonymous
Not applicable

How to show negative value (infinity)

Hi Everyone,

I was using excel as a database. I create a measure that shows the percentage in -/+ when I transfer the database in SQL its shows only positive value, negative value show infinity error. but I need a negative percentage.

 

Please help me out.

thanks

 

Avg of PI variance SIM-Accessory = 
Var NullValue = "N/A"
Var _SIM = SUM(Combine_Data[PI Variances - SIM])
var _ACC = SUM(Combine_Data[PI Variances - Accessory])
Var _Combine = (_SIM + _ACC)
Var _Allowance = SUM(Combine_Data[1% Allowance Cost])
var _Percent = _Combine/[COGS]
Return  
IF(ISBLANK(_Percent),NullValue,_Percent)

SQL Version

SQL.PNG

 

 

 

 

 

 

Excel Version

Excel.PNG

 

1 ACCEPTED SOLUTION

@Anonymous I know what COGS is but my question was, is it a measure? if yes what is the expression, are you getting the value in COGS tables, for debug purpose, visualize if you are getting cogs values and go from there.

 

I would  Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos whoever helped to solve your problem. It is a token of appreciation!

Visit us at https://perytus.com, your one-stop-shop for Power BI-related projects/training/consultancy.



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

View solution in original post

4 REPLIES 4
parry2k
Super User
Super User

@Anonymous what is COGS, can you make sure there is value in COGS when you are switching to SQL

 

I would  Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos whoever helped to solve your problem. It is a token of appreciation!

Visit us at https://perytus.com, your one-stop-shop for Power BI-related projects/training/consultancy.



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Anonymous
Not applicable

@parry2k COGS is Cost of Good Sold yes that also moved to SQL and relationship is also active.

@Anonymous I know what COGS is but my question was, is it a measure? if yes what is the expression, are you getting the value in COGS tables, for debug purpose, visualize if you are getting cogs values and go from there.

 

I would  Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos whoever helped to solve your problem. It is a token of appreciation!

Visit us at https://perytus.com, your one-stop-shop for Power BI-related projects/training/consultancy.



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Anonymous
Not applicable

@parry2k you are right. the issue was in COGS Date Relationship was not working.

 

Thank you for your support.

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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