This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. We're covering it all. You won't want to miss it.
Learn moreLevel up your Power BI skills this month - build one visual each week and tell better stories with data! Get started
Hi
I would like to determine if a particular customer has been active in the last quarter. I have all sales in a column called difference but can't seem to find the right IF statement to return the "ACTIVE" or "INACTIVE" status.
So if the customer's difference is zero or below I would like them to be "INACTIVE" and the reverse if they have purchased.
The idea is that a sales executive can quickly see all their customer who have been inactive over the past quarter.
Thanks in anticipation.
Solved! Go to Solution.
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
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
Hi T
The problem is I get this error message:
Is Difference a calculated column or a measure?
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
Check out the April 2026 Power BI update to learn about new features.
Sign up to receive a private message when registration opens and key events begin.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
| User | Count |
|---|---|
| 36 | |
| 32 | |
| 26 | |
| 24 | |
| 17 |
| User | Count |
|---|---|
| 70 | |
| 50 | |
| 31 | |
| 26 | |
| 22 |