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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
Roodakker
Frequent Visitor

Distinct count of non-numeric value filtered by other table

Hi, 

I want to achieve a measure such as: Due by month = Distinct count of 'Efecte ID' montlhy by its 'next KYC date' 
so that I can use it when projecting/forecasting the upcoming workload by adding
[Amount of current work by month] + [Due by month]

When adding it into a matrix the numbers are adding up correctly, but since the 'next KYC date' is not the primary date  the measures won't work. Can anyone please help? 

 

This is what I want to achieve with my measure, but applied to a matrix. 
Roodakker_0-1708435067286.png

 

And here is the relationship between date and data tables: 

The table are connected to Calender (marked as date table) and to a second Calender table called "Next KYC" which is the one shown in the matrix above.
All datatypes are 'date'. 

 

Roodakker_1-1708435876428.png

 

Any ideas? 

 

/ Ronja 

 

1 ACCEPTED SOLUTION
v-heq-msft
Community Support
Community Support

Hi @Roodakker ,
Based on your description, you would like to create a measure of non-repeating counts based on the "next KYC date".
Based on the data model relationship screenshot you provided, first you need to verify that the relationship between your "Next KYC Date" and the calendar table is set up correctly. It should be a one-to-many relationship, with the Next KYC Date being multi-party. This setting is critical for the TimeSmart feature to work properly.
You can use the userrelationship function:

Due by Month = 
CALCULATE(
    DISTINCTCOUNT('Kyc nordics'[Efecte ID]),
    USERELATIONSHIP('Kyc nordics'[next KYC date], 'CalendarTable'[Date])
)

 

Best regards,

Albert He

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

View solution in original post

1 REPLY 1
v-heq-msft
Community Support
Community Support

Hi @Roodakker ,
Based on your description, you would like to create a measure of non-repeating counts based on the "next KYC date".
Based on the data model relationship screenshot you provided, first you need to verify that the relationship between your "Next KYC Date" and the calendar table is set up correctly. It should be a one-to-many relationship, with the Next KYC Date being multi-party. This setting is critical for the TimeSmart feature to work properly.
You can use the userrelationship function:

Due by Month = 
CALCULATE(
    DISTINCTCOUNT('Kyc nordics'[Efecte ID]),
    USERELATIONSHIP('Kyc nordics'[next KYC date], 'CalendarTable'[Date])
)

 

Best regards,

Albert He

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.