Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi all, i hope you're well!!
I am really struggling with why my SUMX function keeps returning zero. I am attempting to do a customer churn dashboard with revenue column (easy), last period sales:
When you scroll down on this, 1's appear for the customers that ordered in 2022 but not 2023. it should =85 but does not.
Id really appreciate some advice as im quite new and its really doing my head in!
Hi,
could you provide the dax for the SUMX in your card measure:
Here is a working example based on a different condition as a reference:
Data:
Dax:
Proud to be a Super User!
Hi,
It is a bit tricky to confirm is guess is correct, but my assumption is the following:
I think the table visual has a different filter context than your fact table (Table_Query_from_MMS). Because of this when the [Lost Customers 2023] is evaluated over the table the rows are all 0.
Here is an example of this behaviour with my demo data:
Here the table shows 2 rows with 1's. However the card shows 3. This is because when the table contains 3 rows with dim b:
Now when the SUMX evaluates the table without filters -> as per the interaction in card the result is 3.
In your case when if(AND([Last Period's Sales]=0,[Revenue 2022]>0),1,0) is evaluated row by row over Table_Query_from_MM each row likely gets the value 0.
Proud to be a Super User!
Thank you so much for getting back to me! I'm really stumpped!
My Lost customer column is not just returning 0. All together out of this long list, 85 rows return the value of 1. The only issue is summing these up and displaying it on a card.
Hi,
What I meant was that since SUMX will evaluate the formula over your table as seen in table view:
And not as shown in your visual the result might be different eventhough your visual shows 1's.
Basically consider how the IF condition evaluates if it was a added as a calculated column.
Proud to be a Super User!
Check out the July 2025 Power BI update to learn about new features.
User | Count |
---|---|
23 | |
8 | |
7 | |
6 | |
6 |
User | Count |
---|---|
27 | |
12 | |
10 | |
9 | |
6 |