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

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.

Reply
comacabana
Frequent Visitor

Calculated column value based on delivered status of all parts in an order

Hello,

 

I've been stuck with this issue for quite a while now and I still haven't found any concrete answers.

 

I have a list of order numbers, and each order could contain multiple products that are being sold. For my calculated column I'd like to have the value yes or no show up depending on the status of one order. If all items are are delivered I would like it to say yes, and other statuses containing anything but delivered as no. I feel like the solution is really simple but I can't get my head around what to do.

 

I've added an example of what I'd like to acheive below. The complete delivery column is what I want to be the calculated column in PBI

 

I appreciate any help. 

 

Order NumberPartStatusCompelte delivery 
C140815BoltInvoiced/ClosedNo
C140817ScrewInvoiced/ClosedNo
C140817NutInvoiced/ClosedNo
C140944BearingPartially DeliveredNo
C140944BeltReleasedNo
C140944NutPickedNo
C140946BoltDeliveredYes
C140946LightDeliveredYes
C141231PanelInvoiced/ClosedNo
C142329PumpPickedNo
C142331BoltInvoiced/ClosedNo
C145635SwitchboardDeliveredYes
C145635NutDeliveredYes
C145635BearingDeliveredYes

 

 

 

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@comacabana , a new column

 

new column =
var _cnt = countx(filter(Table, [Order Number] =earlier([Order Number])),[Order Number])
var _cnt1 = countx(filter(Table, [Order Number] =earlier([Order Number]) && [Status] = ""Delivered),[Order Number])
return
if(_cnt = _cnt1 , "Yes", "No")

View solution in original post

2 REPLIES 2
amitchandak
Super User
Super User

@comacabana , a new column

 

new column =
var _cnt = countx(filter(Table, [Order Number] =earlier([Order Number])),[Order Number])
var _cnt1 = countx(filter(Table, [Order Number] =earlier([Order Number]) && [Status] = ""Delivered),[Order Number])
return
if(_cnt = _cnt1 , "Yes", "No")

This worked perfectly thank you so much!

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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