Forum Discussion

Tacptriathlete's avatar
Tacptriathlete
Frequent Visitor
2 years ago
Solved

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 DateReason CodeDependency Id NumWork Order Num
1/3/2024MATERIAL I65431351320733
1/3/2024MATERIAL R65431351320733
1/3/2024MATERIAL S65431351320733
1/3/2024MATERIAL D65431351320733
1/3/2024MATERIAL I65443346615421
1/3/2024MATERIAL R65443346615421
1/3/2024MATERIAL D65443346615421
1/3/2024MATERIAL S654433/65489646615421
  • lbendlin's avatar
    lbendlin
    2 years ago

    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

  • 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.

  • 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 DateReason CodeDependency Id NumWork Order Num
    1/3/2024MATERIAL I65431351320733
    1/3/2024MATERIAL R65431351320733
    1/3/2024MATERIAL S65431351320733
    1/3/2024MATERIAL D65431351320733
    1/3/2024MATERIAL I65443346615421
    1/3/2024MATERIAL R65443346615421
    1/3/2024MATERIAL D65443346615421
    1/3/2024MATERIAL S654433/65489646615421
    1/3/2024MATERIAL I65444745033766
    1/3/2024MATERIAL R65444745033766
    1/3/2024MATERIAL D65444745033766
    1/3/2024MATERIAL R65485743802738
    1/3/2024MATERIAL S65485743802738
    1/3/2024MATERIAL D65485743802738
    1/3/2024MATERIAL D65485743802738
    • lbendlin's avatar
      lbendlin
      Icon for Super User rankSuper 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