cancel
Showing results for 
Search instead for 
Did you mean: 
0

button Count(Distinct) shows wrong data

It's easy to create a query from a DB as below.

select 1

union

select 2

union

select NULL

 

Let's say the above column name is ID, then you do count and count(distinct) for ID. It will show as this one.

COUNT(DISTINCT)Count
32

 

It's wrong as NULL should not be counted in results. So could you please check and fix this issue? Thanks.

 

Status: Delivered
Comments
Moderator

@Riaon ,

Please check the following response from PG:


"This is by design. We’ll provide a separate function to count discount values minus the BLANK in the future."

Currently, please vote up this idea. Meanwhile, you can create the following measure to work around this issue.

Measure  = CALCULATE(DISTINCTCOUNT('Yourtable'[ID]),FILTER(ALL('Yourtable'),'YourTable'[ID]<>BLANK()))
 

 



Regards,
Lydia

Moderator
Status changed to: Delivered
 
Frequent Visitor

Okay and Thanks, Lydia.