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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
dscott73
Resolver I
Resolver I

CountDistinct seems to return incorrect value

I have a table with multiple rows of transactions.  I have created a YYYYMM (YearMonth) column from the TransDate colum.  I think have a measure named MonthCount which (should) count the distinct Months of the Year(s) selected.  In the below image you can see the grid returns the expected distinct YYYYMM, but the DistinctCount is returning 14?

 

What am I missing?

 

2017-12-05_16-31-18.png

 

 

1 ACCEPTED SOLUTION

I think I have found the issue. I am using the TransDate column, there is another date column which the tables are related by. 

View solution in original post

3 REPLIES 3
Phil_Seamark
Employee
Employee

Hi @dscott73

 

What value do you use in your slicer?  Is it using a Year column from a related table?


To learn more about DAX visit : aka.ms/practicalDAX

Proud to be a Datanaut!

I think I have found the issue. I am using the TransDate column, there is another date column which the tables are related by. 

I am using the Year column from a Date table for the value of the slicer.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.