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.
So the point is that whenever you add numbers together and there is a blank value, the result must always be blank. If the blank value does not appear in the sum of the column, then it is a number value.
How can you manipulate this outcome?
Table
Category | value |
a | 1 |
b | |
c | 3 |
The sum(table[value])
total = BLANK
Solved! Go to Solution.
Hi @Anonymous
Interesting and unusual requirement 🙂
You could use COUNTBLANK to determine if at least one BLANK value is present, and if so return BLANK, otherwise return the sum.
A concise way of putting it could be:
SUM modified =
IF (
NOT COUNTBLANK ( 'table'[value] ),
SUM ( 'table'[value] )
)
If the value returned by COUNTBLANK(...) is nonzero, it will be cast to the value TRUE, and then NOT COUNTBLANK(...) will be FALSE.
Does this work for you?
Hi @Anonymous
Interesting and unusual requirement 🙂
You could use COUNTBLANK to determine if at least one BLANK value is present, and if so return BLANK, otherwise return the sum.
A concise way of putting it could be:
SUM modified =
IF (
NOT COUNTBLANK ( 'table'[value] ),
SUM ( 'table'[value] )
)
If the value returned by COUNTBLANK(...) is nonzero, it will be cast to the value TRUE, and then NOT COUNTBLANK(...) will be FALSE.
Does this work for you?
User | Count |
---|---|
14 | |
12 | |
8 | |
6 | |
5 |
User | Count |
---|---|
29 | |
18 | |
13 | |
8 | |
5 |