cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
reije021 Frequent Visitor
Frequent Visitor

null = 0

I have this column with "null" values and "0"  values (responses)

 

amount = calculate(countrows([table]);value = 0)

amount = 23 

dax counts all rows

amount should be 3, because 3 rows contain value 0

so I tried the filter allnoblankrow but I still get amount 23

 

can somebody give me the dax formule that gives amount = 3

 

I can't replace the null because they should remain blank for the response%

 

 

image001.png

1 ACCEPTED SOLUTION

Accepted Solutions
Super User
Super User

Re: null = 0

Hey, here is the formula you are looking for (hopefully)

 

CALCULATE(
	COUNTROWS('TableWithZeroAndBlankValues')
	,'TableWithZeroAndBlankValues'[Amount] = 0 && NOT(ISBLANK('TableWithZeroAndBlankValues'[Amount]))
)

Regards

Tom

Hamburg - Germany
If I answer you question, please mark my post as solution, this will also help others.
Proud to be a Datanaut!
2 REPLIES 2
BILASolution Established Member
Established Member

Re: null = 0

Hi @reije021

 

Try this...

 

null = 0.png

 

 

 

Total null = CALCULATE(COUNTROWS(Table1);ISBLANK(Table1[Column]))

Total 0 = COUNT(Table1[Column])

 

 

Super User
Super User

Re: null = 0

Hey, here is the formula you are looking for (hopefully)

 

CALCULATE(
	COUNTROWS('TableWithZeroAndBlankValues')
	,'TableWithZeroAndBlankValues'[Amount] = 0 && NOT(ISBLANK('TableWithZeroAndBlankValues'[Amount]))
)

Regards

Tom

Hamburg - Germany
If I answer you question, please mark my post as solution, this will also help others.
Proud to be a Datanaut!

Helpful resources

Announcements
Back to School Contest

Back to School Contest

Engage and empower students with Power BI!

MBAS Gallery

Watch Sessions On Demand!

Continue your learning in our online communities.

Summit Australia 2019

Summit Australia 2019

Travel to Melbourne and network with thousands of peers!

Top Ideas
Users Online
Currently online: 339 members 3,797 guests
Please welcome our newest community members: