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

Frequency of work based on set standards

Hello! I could use some guidance on creating a measure and KPI that can count (distinct) the number of frequencies and calculate if it has reached or not from a set standards. The frequency could be weekly, monthly, or yearly and the standard is the amount of times it needs to meet. The table of maintenance standards can be changed if needed as this was created manually and open to all suggestions, thank you! 

 

Tables:

WQPF_Labor

WO NUMBERBooked Employee NamePM IDHOURSLabor Cost
696854Smith, JohnPM-WQPF-012          0.5$24.02
696854Smith, JohnPM-WQPF-012          0.5$0.00
696853Smith, JohnPM-WQPF-012          0.5$24.02
696853Smith, JohnPM-WQPF-012          0.5$0.00
696852Smith, JohnPM-WQPF-012          0.5$24.02
696852Smith, JohnPM-WQPF-012          0.5$0.00
696719Smith, JohnPM-WQPF-019           4$55.80
696719Smith, JohnPM-WQPF-019           4 $159.08
696719Smith, JohnPM-WQPF-019          2.5$0.00
696705Smith, JohnPM-WQPF-018          8$318.16
696705Smith, JohnPM-WQPF-018         40$1,425.60
696705Smith, JohnPM-WQPF-018         40$1,425.60
696691Smith, JohnPM-WQPF-017          1$48.03
696667Smith, JohnPM-WQPF-016          1$48.03

 

Maintenance_Standard

PM IDStandardFrequencyStatus
 PM-WQPF-012      1MONTHLYIn-Service
 PM-WQPF-013      1MONTHLYIn-Service
 PM-WQPF-014      1MONTHLYIn-Service
 PM-WQPF-015      1MONTHLYIn-Service
 PM-WQPF-016      6YEARLYIn-Service
 PM-WQPF-017      6YEARLYIn-Service
 PM-WQPF-018      6YEARLYIn-Service
 PM-WQPF-019      6YEARLYIn-Service
 PM-WQPF-020      6YEARLYIn-Service
 PM-WQPF-021      6YEARLYIn-Service

 

pmid.PNG

 

Desired Output: 

PM IDDistinct CountKPI
PM-WQPF-012       1PASS
PM-WQPF-016       4FAIL

 

2 REPLIES 2
lbendlin
Super User
Super User

I don't understand this part: "count (distinct) the number of frequencies".

Note that [PM ID] in your second table has an extra leading space.

I would also strongly recommend against a M:M relationship. Please explain why it is necessary.

Anonymous
Not applicable

I need to find how many times a WO is on the labor table from the PM ID. The frequency is the maintenance standard so for example the PM ID must have been completed 5 times in a month period. 

How can I fix the M:M relationship as there are many PM IDs on both tables? 


Thank I will fix the extra leading space! 

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.