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
DevonVanDam
Helper I
Helper I

Subtotal on negative + positive value > counts the negative as positive

Hi,

 

I tried to look at previous topics, but the ones I could find are not really helping me with my problem.

 

I've column A which tells me if it's a sales or purchase line and then column B gives me the value (always positive - unless return etc.). I made a formula that if column A says sales it should convert the formula against *-1. So my purchases up the stock and sales lower it (thats why negative value). However in my table the subtotal counts the negative and positive, both as a positive:

Power BI - subtotal issue.JPG

 

Formula I use to convert the value is: 

ActualCOMP = IF(
CONTAINS('00 - Master database';'00 - Master database'[Level];"[SALES]");
CALCULATE([Actual]*-1);
CALCULATE([Actual])
)
 
Does anyone know how to solve this? 
 
Thanks,
Devon
1 ACCEPTED SOLUTION
dax
Community Support
Community Support

Hi DevonVanDam, 

You could refer to my sample to see whether it work or not.

Best Regards,
Zoe Zhi

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

1 REPLY 1
dax
Community Support
Community Support

Hi DevonVanDam, 

You could refer to my sample to see whether it work or not.

Best Regards,
Zoe Zhi

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

 

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

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.