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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

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
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.