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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

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
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 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.

Top Solution Authors