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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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