The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.
How can I force sumx to recognize blanks? If Pres Amt is blank, I would like Pres Amt to be equal to 0. Var $ column is caculating the rows correctly, but not the total so I used sumx. Churn is correct, except for the blanks
Solved! Go to Solution.
Below is my solution without sharing sensitive data. I created this calculation by division.
Below is my solution without sharing sensitive data. I created this calculation by division.
Hi @petercd
Please try this formula:
Hi @petercd ,
A blank value is automatically converted to 0 when it encounters a comparison operator, so your Churn expression above shouldn't be blank in the first two rows. For exmaple, In below demo, the Churn correctly return the value in first two rows.
Since it's not clear what the exact calculation environment is in your report, I can only suggest that you use the following measure to see if you can meet the requirements:
Churn =
SUMX(
CROSSJOIN(
VALUES('Table'[DimField1), // Dimension fields used for matrix row labels
VALUES('Table'[DimField2),
...
),
[Var $]
)
Did I answer your question? If yes, pls mark my post as a solution and appreciate your Kudos !
Thank you~
if you wanna avoid showing Churn for positive numbers in Pres Amt, try using COALESCE
User | Count |
---|---|
15 | |
12 | |
8 | |
7 | |
7 |
User | Count |
---|---|
24 | |
21 | |
12 | |
10 | |
7 |