Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Tacptriathlete
Frequent Visitor

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
1 ACCEPTED SOLUTION

No need for DAX - a graphical solution shows the distinct count of Reason Code per Dependency ID

 

lbendlin_0-1710530299290.png

 

If you wanted DAX you would use the same logic in an explicit measure

 

lbendlin_1-1710530377132.png

 

View solution in original post

3 REPLIES 3
Tacptriathlete
Frequent 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 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

No need for DAX - a graphical solution shows the distinct count of Reason Code per Dependency ID

 

lbendlin_0-1710530299290.png

 

If you wanted DAX you would use the same logic in an explicit measure

 

lbendlin_1-1710530377132.png

 

lbendlin
Super User
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.

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.