Forum Discussion
New Guy, Request: Building a measure using which function that equals success
Hello,
I would like to create a measure using a DAX function. This measure will indicate success for a delivery when four different values appear for the same value in another column. In the chart below, I would like to group the dependency ID's, which are the same, to indicate successful delivery when material I, R, S and, D appear for the same dependency ID. Example the dependency number ID 654313 and 654433 has a successful delivery because the value has a material R,S,D and I. In additional measure, I would be to display the information for successful delivery for a work order with associated information like required date, work order number and dependency ID. Thanks
| Required Date | Reason Code | Dependency Id Num | Work Order Num |
| 1/3/2024 | MATERIAL I | 654313 | 51320733 |
| 1/3/2024 | MATERIAL R | 654313 | 51320733 |
| 1/3/2024 | MATERIAL S | 654313 | 51320733 |
| 1/3/2024 | MATERIAL D | 654313 | 51320733 |
| 1/3/2024 | MATERIAL I | 654433 | 46615421 |
| 1/3/2024 | MATERIAL R | 654433 | 46615421 |
| 1/3/2024 | MATERIAL D | 654433 | 46615421 |
| 1/3/2024 | MATERIAL S | 654433/654896 | 46615421 |
No need for DAX - a graphical solution shows the distinct count of Reason Code per Dependency ID
If you wanted DAX you would use the same logic in an explicit measure
3 Replies
- lbendlin
Super User
Please provide sample data that fully covers your issue. Show examples that evaluate to false. Explain why there is a / in the last row.
Please show the expected outcome based on the sample data you provided. - TacptriathleteFrequent Visitor
I have tried to use a simple equation to filter out the material R’s but have had no results. Material R1 = CALCULATE(FILTER('Sheet1',[Delivery Status]="Material R"),[Delivery Status]). I have looked into using the MATCHBY DAX function but has proven to be more complex. The row with / in the value is error by data entry which would make the delivery unsuccessful. Below is a simplistic example of what the combined values should have in order to be a successful delivery. Also, I have put more information values in the table below. Thanks
Example
Dependency Id Num 654313 + Reason Code Material I +
Dependency Id Num 654313 + Reason Code Material R +
Dependency Id Num 654313 + Reason Code Material S +
Dependency Id Num 654313 + Reason Code Material D +
= Successful Delivery for Dependency Id Num 654313
Required Date Reason Code Dependency Id Num Work Order Num 1/3/2024 MATERIAL I 654313 51320733 1/3/2024 MATERIAL R 654313 51320733 1/3/2024 MATERIAL S 654313 51320733 1/3/2024 MATERIAL D 654313 51320733 1/3/2024 MATERIAL I 654433 46615421 1/3/2024 MATERIAL R 654433 46615421 1/3/2024 MATERIAL D 654433 46615421 1/3/2024 MATERIAL S 654433/654896 46615421 1/3/2024 MATERIAL I 654447 45033766 1/3/2024 MATERIAL R 654447 45033766 1/3/2024 MATERIAL D 654447 45033766 1/3/2024 MATERIAL R 654857 43802738 1/3/2024 MATERIAL S 654857 43802738 1/3/2024 MATERIAL D 654857 43802738 1/3/2024 MATERIAL D 654857 43802738 - lbendlin
Super User
No need for DAX - a graphical solution shows the distinct count of Reason Code per Dependency ID
If you wanted DAX you would use the same logic in an explicit measure