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
Anonymous
Not applicable

Measure a KPI based on a date from related table

Hello, 

 

I have a question, how would one calculate the KPI of a Quality issue based on a date from another table that is related via a main table with active relationships. See the example below.

 

OQD.PNG

 

Many thanks!

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hello, I solved the questions by myself.

 

Created a copy of Table A

Created a new relationship with Table C based on Supplier Nr.

Created 2 measures : 1 Sum Order QTY  2. Sum Defect QTY

Divided both measures 

 

Outcome: Order date now is used to see the overall performance based on total QTY Defect / monthly orders 

 

Thanks for looking up in the issue

View solution in original post

9 REPLIES 9
tex628
Community Champion
Community Champion

Hi @Anonymous,

Which columns are the relationship on? 

Br,
J


Connect on LinkedIn
Anonymous
Not applicable

Hi, so the Supplier Nr. would be the main ID for relationships.

 

Sorry forgot to mention

tex628
Community Champion
Community Champion

If the relationship is on supplier ID you will not be able to create any KPI that has a relation to periods. (In your image you are referencing months). 

I would create a calendar table and a table of distinct suppliers and connect them like this: 

image.png
Which should allow you to compare the defects with orders while also filtering on specific time periods. 

/ J


Connect on LinkedIn
Anonymous
Not applicable

Hi J, Unfortunately it won't work - our data model has multiple connections with the table B (main table) therefore all other relationships won't be active.

Hi @Anonymous ,

 

Would you please try to use USERELATIONSHIP function?

 

Best Regards,

Dedmon Dai

Anonymous
Not applicable

Hello, I solved the questions by myself.

 

Created a copy of Table A

Created a new relationship with Table C based on Supplier Nr.

Created 2 measures : 1 Sum Order QTY  2. Sum Defect QTY

Divided both measures 

 

Outcome: Order date now is used to see the overall performance based on total QTY Defect / monthly orders 

 

Thanks for looking up in the issue

Hi @Anonymous ,

 

Thank you for sharing the solution. Would you please accpet your reply as answer so that people with the same issue will find the solution fast.

 

Thank you for your support and understanding.

 

Best Regards,

Dedmon Dai

Anonymous
Not applicable

Hi J,

 

Will try and let you know if it worked. Thank you for the suggestion!

 

Best regards,

 

C

Hi @Anonymous ,

 

Would you please try to create an inactive relationship between TABLE A and  TABLE B. Then use USERELATIONSHIP function. For more details, please refer to  https://docs.microsoft.com/en-us/dax/userelationship-function-dax

 

Best Regards,

Dedmon Dai

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.