Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

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
v-yuezhe-msft
Employee

@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

v-yuezhe-msft
Employee
Status changed to: Delivered
 
Riaon
Employee

Okay and Thanks, Lydia.