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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
a4apple
Helper I
Helper I

Need help with DAX Query DISTINCT Count

Hi all,

I have a table where I am using a measure to find the count of distinct Rkey's in a table that has the level > 5.

 

The DAX statement I am using is giving me wrong data. 

Measure 1 := CALCULATE(COUNTROWS(DISTINCT('Event'[RKey])), FILTER('Event', 'Event'[level] > 5))

 

When I use this for a query I am getting wrong data. I am seeing data for Keys that doesn't have any event on that particular day. 

Please help me in understanding what I am doing wrong.

 

Thanks in advance.

 

1 REPLY 1
v-sihou-msft
Microsoft Employee
Microsoft Employee

@a4apple

 

In this scenario, since you alread filter out the "'Event'[level] > 5" table context, it supposes to return BLANK() for Keys with no Event. I can't reproduced your issue.

 

99.PNG

Please share some sample data if possible.

 

Regards,

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.