Forum Discussion
Anonymous
4 years agoNot applicable
Using * -1 with a Dax measure
Power BI Community Good Day! The Dax below is giving me a positive value. What do I have to do to modify the Dax with * -1 to make it a negative value? Net Timing = CALCULATE(SUM(metricssale...
- 4 years ago
Hi Anonymous ,
You can try below code:-
Net Timing = VAR result = CALCULATE ( SUM ( metricssalescustomer[amount] ), metricssalescustomer[sales_type_lvl1] = "Lost - Timing" || metricssalescustomer[sales_type_lvl1] = "Decline - Timing" || metricssalescustomer[sales_type_lvl1] = "Upsell - Timing" || metricssalescustomer[sales_type_lvl1] = "New - Timing" ) RETURN result * -1Thanks,
Samarth
- 4 years ago
You can just stick a "-" in from of CALCULATE or SUM too but you may want to keep more visible than just a single character.
I'd probably do something like this:
Net Timing = CALCULATE ( -1 * SUM ( metricssalescustomer[amount] ), metricssalescustomer[sales_type_lvl1] IN { "Lost - Timing", "Decline - Timing", "Upsell - Timing", "New - Timing" } )
AlexisOlson
Super User
4 years agoYou can just stick a "-" in from of CALCULATE or SUM too but you may want to keep more visible than just a single character.
I'd probably do something like this:
Net Timing =
CALCULATE (
-1 * SUM ( metricssalescustomer[amount] ),
metricssalescustomer[sales_type_lvl1]
IN { "Lost - Timing", "Decline - Timing", "Upsell - Timing", "New - Timing" }
)Anonymous
4 years agoNot applicable
Hello Alexis
Will give it a try.
Thank you