Forum Discussion
IF statement
- 7 years ago
Managed to solve it after looking extensively on the web with a new measure:
InactiveCustomers = CALCULATE( COUNTROWS( 'Customer List Table' ), FILTER( ALL('Customer List Table'[Difference]), 'Customer List Table'[Difference] <= 0 ))
Thanks for the help anyway
Hi Qualube,
Do you want to this in DAX or in Power Query?
In Power Query:
if [difference]<=0 then "INACTIVE" else "ACTIVE"
In DAX:
IF(table[difference]<=0, "INACTIVE", "ACTIVE")
Br,
T
- Qualube8 years agoHelper II
Hi T
The problem is I get this error message:
- Caitlin_Knox8 years agoAdvocate III
Is Difference a calculated column or a measure?
- Qualube8 years agoHelper II
Hi Caitlin
It's a measure as what I need to do is filter through the [difference] column and return the number of customers with zero or negative sales over a quarter.
I have looked extensively and I think SUMX is the expression I need to use but I can't make it work.
Thanks