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
wooand
Helper II
Helper II

Change calculationss according to a name within a column.

This is proving difficult:

 

I have a measure which is SUM(Sheet1[amount1]/SUM(Sheet1[amount2)*10000.  This works just fine, but for one name in the column, the amounts involved are negative which of course creates a positive result.  I need to show a negative result so I was hoping to simply use an IF function to flip the calc when it encounters the 'negative' name, giving me a negative result where required in the report.  In Excel creating an IF function is easy, and works, and I can do it as a calculated column in DAX, but I need it as a measure in order to be able to show everything in a single column with the correct sign.

 

Any clues as to how to build this correctly?

4 REPLIES 4
v-caliao-msft
Microsoft Employee
Microsoft Employee

@wooand,

 

Could you pleas show us some sample data? Generally, we can use IF function to check if it's a negative value. In your scenario, please elaborate your expected with sample data, so that we can make further analysis.

 

Regards,

Charlie Liao

Thanks for taking a look Charlie, but I've built a way around.  I really don't think it's possible any other way in fact!

Would you please post your solution so we can all benefit from it

I did the most basic thing possible.  I calculated the equation to create the negative value I wanted and then just set up a new visual with that calculation in.  I can't create a list with all the values together, bnut rather I now have two lists, one with positive values and one with negative.  It's inelegant and messy, but that's life for me...

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.