cancel
Showing results for 
Search instead for 
Did you mean: 

Count Negative Values

peersbrennanctb
Participant
0 Kudos
130

Hi

I am trying to create a calculations that counts the number of products have an overall negative margin.

I have Product_ID, Total_Sales, Total_Cost, Margin (Total_Sales + Total Cost).

How would i be able to see the number of products that have a negative margin

Thanks

Accepted Solutions (0)

Answers (1)

Answers (1)

N1kh1l
Active Contributor

peersbrennanctb

If you already have Total Margin calculated then go for a calculated measure to test negative margin

If ( Total Margin <0,1,0)

Now create a aggregation measure with Sum on the previous calculated measure and you can do a constant selection of products and select all products or the product top node if you have a product hierarchy.

Hope this helps

Nikhil