Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!View all the Fabric Data Days sessions on demand. View schedule
I have 2 tables, 1 which has the contractor and job number. The other has the job number and maintenance status. My end goal is splitting the contractors up by indoor nad outdoor contractors and makign %'s of "Completed - Within Target" and "Completed - Out of Target.
I have made a relationship between the job numbers and added a measure to separate the statuses tht takes into consideration the date range I need:
How do I add in the contractos below to get two different %'s for Indoro and Outdoor? (Tables Below)
Indoor Contractors:
- Jones Plumber
- North Heating
- Smith Electrician
Outdoor Contractors
- Davis Roofing
- Mark Gutters
| Job_Number | Status | Date_Completed |
| 1 | Completed - Within target | 01/01/2017 |
| 2 | Completed - Within target | 02/01/2018 |
| 3 | Completed - Outside of target | 03/01/2018 |
| 4 | Completed - Outside of target | 04/01/2018 |
| 5 | Completed - Outside of target | 05/01/2018 |
| 6 | Completed - Within target | 06/01/2019 |
| 7 | Completed - Outside of target | 07/01/2019 |
| 8 | Completed - Within target | 08/01/2020 |
| 9 | Completed - Outside of target | 09/01/2020 |
| 10 | Completed - Outside of target | 10/01/2021 |
| 11 | Completed - Within target | 11/01/2021 |
| 12 | Completed - Outside of target | 12/01/2022 |
| 13 | Completed - Outside of target | 13/01/2023 |
| 14 | Completed - Within target | 14/01/2023 |
| 15 | Completed - Within target | 15/01/2023 |
| 16 | Completed - Within target | 16/01/2024 |
| 17 | Completed - Outside of target | 17/01/2024 |
| 18 | Completed - Within target | 18/01/2024 |
| 19 | Completed - Outside of target | 19/01/2024 |
| 20 | Completed - Outside of target | 20/01/2024
|
| Contractor | Job_Number |
| Jones Plumber | 1 |
| Jones Plumber | 2 |
| Jones Plumber | 3 |
| North Heating | 4 |
| North Heating | 5 |
| North Heating | 6 |
| North Heating | 7 |
| Smith Electrician | 8 |
| Smith Electrician | 9 |
| Smith Electrician | 10 |
| Jones Plumber | 11 |
| Jones Plumber | 12 |
| Jones Plumber | 13 |
| Jones Plumber | 14 |
| Davis Roofing | 15 |
| Davis Roofing | 16 |
| Davis Roofing | 17 |
| Mark Gutters | 18 |
| Mark Gutters | 19 |
| Mark Gutters | 20 |
Thanks in advance
Solved! Go to Solution.
Hi, @RichOB
I am glad to help you.
It is assumed that you have already created this Measure:
Completed_within_total =
CALCULATE(
COUNT('Table'[Job_Number]),
KEEPFILTERS('Table'[Status] = "Completed - Within target"),
'Table'[Date_Completed] >= DATE(2018,4,1),
'Table'[Date_Completed] <= DATE(2025,3,31)
)
Please create three Measures based on the following DAX formulas and I hope they do help you:
Total_Jobs:
Total_Jobs = COUNT('Table'[Job_Number])
Indoor_Completed_Percentage:
Indoor_Completed_Percentage =
CALCULATE(
[Completed_within_total],
FILTER(
'ContractorTable',
'ContractorTable'[Contractor] IN {"Jones Plumber", "North Heating", "Smith Electrician"}
)
) / CALCULATE(
[Total_Jobs],
FILTER(
'ContractorTable',
'ContractorTable'[Contractor] IN {"Jones Plumber", "North Heating", "Smith Electrician"}
)
)
Outdoor_Completed_Percentage:
Outdoor_Completed_Percentage =
CALCULATE(
[Completed_within_total],
FILTER(
'ContractorTable',
'ContractorTable'[Contractor] IN {"Davis Roofing", "Mark Gutters"}
)
) / CALCULATE(
[Total_Jobs],
FILTER(
'ContractorTable',
'ContractorTable'[Contractor] IN {"Davis Roofing", "Mark Gutters"}
)
)
Output:
I have attached the pbix file for this example below, hope it helps you.
I hope my suggestions give you good ideas, if you have any more questions, please clarify in a follow-up reply.
Best Regards,
Fen Ling,
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi, @RichOB
I am glad to help you.
It is assumed that you have already created this Measure:
Completed_within_total =
CALCULATE(
COUNT('Table'[Job_Number]),
KEEPFILTERS('Table'[Status] = "Completed - Within target"),
'Table'[Date_Completed] >= DATE(2018,4,1),
'Table'[Date_Completed] <= DATE(2025,3,31)
)
Please create three Measures based on the following DAX formulas and I hope they do help you:
Total_Jobs:
Total_Jobs = COUNT('Table'[Job_Number])
Indoor_Completed_Percentage:
Indoor_Completed_Percentage =
CALCULATE(
[Completed_within_total],
FILTER(
'ContractorTable',
'ContractorTable'[Contractor] IN {"Jones Plumber", "North Heating", "Smith Electrician"}
)
) / CALCULATE(
[Total_Jobs],
FILTER(
'ContractorTable',
'ContractorTable'[Contractor] IN {"Jones Plumber", "North Heating", "Smith Electrician"}
)
)
Outdoor_Completed_Percentage:
Outdoor_Completed_Percentage =
CALCULATE(
[Completed_within_total],
FILTER(
'ContractorTable',
'ContractorTable'[Contractor] IN {"Davis Roofing", "Mark Gutters"}
)
) / CALCULATE(
[Total_Jobs],
FILTER(
'ContractorTable',
'ContractorTable'[Contractor] IN {"Davis Roofing", "Mark Gutters"}
)
)
Output:
I have attached the pbix file for this example below, hope it helps you.
I hope my suggestions give you good ideas, if you have any more questions, please clarify in a follow-up reply.
Best Regards,
Fen Ling,
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi,
Please share the desired Output based on the sample data. The ask is not much clear to me.
Hi @Rupak_bi thanks for your reply.
I need two measures that separate the contractors to Indoor and outdoor contractors so I can make a Completed % dial like below.
Thanks
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!