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.
Hello,
I could use some help with building a DAX measure that can determine the amount of times in a year period the count of booked dates for each WO assetID and then see if it is equal or greater than a value(Standard), the end output should be a "Pass" or "Fail". I need some help with including time intelligence into the PassFail measure.
WorkOrder_Table
WO assetID | WO PM Code | Year | Month | Distinct count Booked Date |
C15-DRYPOND-01 | PM-WQPF-01 | 2016 | April | 1 |
C15-DRYPOND-01 | PM-WQPF-01 | 2016 | May | 1 |
C15-DRYPOND-01 | PM-WQPF-01 | 2016 | June | 1 |
C15-DRYPOND-01 | PM-WQPF-01 | 2016 | July | 1 |
C15-DRYPOND-01 | PM-WQPF-01 | 2016 | August | 2 |
C15-DRYPOND-01 | PM-WQPF-01 | 2016 | September | 1 |
C15-DRYPOND-01 | PM-WQPF-01 | 2016 | October | 1 |
C15-DRYPOND-01 | PM-WQPF-01 | 2016 | November | 2 |
C15-DRYPOND-01 | PM-WQPF-01 | 2016 | December | 1 |
C15-DRYPOND-01 | PM-WQPF-01 | 2017 | January | 1 |
C15-DRYPOND-01 | PM-WQPF-01 | 2017 | February | 1 |
C15-DRYPOND-01 | PM-WQPF-01 | 2017 | March | 1 |
C15-DRYPOND-01 | PM-WQPF-01 | 2017 | April | 1 |
C15-DRYPOND-01 | PM-WQPF-01 | 2017 | May | 1 |
C15-DRYPOND-01 | PM-WQPF-01 | 2017 | June | 1 |
C15-DRYPOND-01 | PM-WQPF-01 | 2017 | July | 1 |
C15-DRYPOND-01 | PM-WQPF-01 | 2017 | August | 1 |
C15-DRYPOND-01 | PM-WQPF-01 | 2017 | September | 1 |
C15-DRYPOND-01 | PM-WQPF-01 | 2017 | October | 1 |
C15-DRYPOND-01 | PM-WQPF-01 | 2017 | November | 1 |
C15-DRYPOND-01 | PM-WQPF-01 | 2017 | December | 1 |
C15-DRYPOND-01 | PM-WQPF-01 | 2018 | January | 1 |
C15-DRYPOND-01 | PM-WQPF-01 | 2018 | February | 1 |
C15-DRYPOND-01 | PM-WQPF-01 | 2018 | March | 1 |
C15-DRYPOND-01 | PM-WQPF-01 | 2018 | April | 1 |
C15-DRYPOND-01 | PM-WQPF-01 | 2018 | May | 1 |
C15-DRYPOND-01 | PM-WQPF-01 | 2018 | August | 1 |
C15-DRYPOND-01 | PM-WQPF-01 | 2018 | September | 1 |
C15-DRYPOND-01 | PM-WQPF-01 | 2018 | November | 1 |
C15-DRYPOND-01 | PM-WQPF-03 | 2016 | June | 1 |
C15-DRYPOND-01 | PM-WQPF-03 | 2016 | October | 1 |
C15-DRYPOND-01 | PM-WQPF-03 | 2017 | June | 1 |
C15-DRYPOND-01 | PM-WQPF-03 | 2017 | November | 1 |
C15-DRYPOND-01 | PM-WQPF-03 | 2018 | July | 1 |
C15-DRYPOND-01 | PM-WQPF-03 | 2018 | November | 1 |
C15-DRYPOND-01 | PM-WQPF-26 | 2019 | March | 1 |
C15-DRYPOND-01 | PM-WQPF-26 | 2019 | April | 1 |
C15-DRYPOND-01 | PM-WQPF-26 | 2019 | July | 2 |
C15-DRYPOND-01 | PM-WQPF-26 | 2019 | December | 1 |
C15-DRYPOND-01 | PM-WQPF-26 | 2020 | June | 1 |
C15-DRYPOND-01 | PM-WQPF-27 | 2019 | July | 1 |
C15-DRYPOND-01 | PM-WQPF-27 | 2020 | June | 1 |
Frequency_Check
PM ID | Frequency | Standard |
PM-WQPF-047 | MONTHLY | 1 |
PM-WQPF-26 | MONTHLY | 1 |
PM-WQPF-27 | MONTHLY | 1 |
PM-WQPF-29 | MONTHLY | 1 |
PM-WQPF-30 | MONTHLY | 1 |
PM-WQPF-32 | MONTHLY | 1 |
PM-WQPF-33 | MONTHLY | 1 |
PM-WQPF-35 | MONTHLY | 2 |
PM-WQPF-36 | MONTHLY | 1 |
PM-WQPF-37 | MONTHLY | 1 |
PM-WQPF-38 | MONTHLY | 1 |
PM-WQPF-39 | MONTHLY | 1 |
PM-WQPF-40 | MONTHLY | 1 |
PM-WQPF-40 | YEAR | 2 |
PM-WQPF-42 | MONTHLY | 1 |
PM-WQPF-43 | MONTHLY | 1 |
PM-WQPF-43 | YEAR | 2 |
PM-WQPF-44 | MONTHLY | 1 |
PM-WQPF-44 | YEAR | 2 |
PM-WQPF-10 | MONTHLY | 1 |
PM-WQPF-25 | MONTHLY | 1 |
PM-WQPF-26 | YEAR | 2 |
PM-WQPF-36 | MONTHLY | 1 |
PM-WQPF-38 | QUARTERLY | 1 |
PM-WQPF-39 | YEAR | 1 |
Current Measures:
TotalBookedDates = SUM(WorkOrder_Table[Distinct count Booked Date])
TotalStandard = SUM(Frequency_Check[Standard])
PassFail =
VAR m_check = [TotalBookedDates]
RETURN
IF(m_check >= [TotalStandard],"Pass","Fail")
Desired Output:
Year | Month | WO assetID | WO PM Code | Distinct count Booked Date | Frequency | Standard | Measure |
2019 | March | C15-DRYPOND-01 | PM-WQPF-26 | 1 | YEAR | 2 | Fail |
2019 | March | P26-DRYPOND-04 | PM-WQPF-26 | 1 | YEAR | 2 | Fail |
Solved! Go to Solution.
Hi, @Anonymous
According to your description, I can roughly understand your requirement, I think you can achieve this using “Merge query” in the power query and a calculated column, you can try my steps:
Result =
IF(
[Distinct count Booked Date]>=[Frequency_Check.Standard],"Pass","Fail")
And you can get what you want.
You can download my test pbix file below
Thank you very much!
Best Regards,
Community Support Team _Robert Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi, @Anonymous
According to your description, I can roughly understand your requirement, I think you can achieve this using “Merge query” in the power query and a calculated column, you can try my steps:
Result =
IF(
[Distinct count Booked Date]>=[Frequency_Check.Standard],"Pass","Fail")
And you can get what you want.
You can download my test pbix file below
Thank you very much!
Best Regards,
Community Support Team _Robert Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Great thank you this will work!
Hi,
What problem do you face with your existing measures? Do you not get the desired result?
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
106 | |
93 | |
75 | |
62 | |
50 |
User | Count |
---|---|
147 | |
107 | |
105 | |
87 | |
61 |