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
RustyNails
Helper III
Helper III

Create a checklist column based on criteria (if all items are available, then product is good)

Hello, I'm trying to create a calculated column which acts as a checklist for product. We're basically going to check if all the parts are available and in correct quantity. If true, then say "Ready", otherwise say "Not Ready".

Example:

 

Build Order IDSKUQtyBuild Status
P100001334943Ready
P100001334956Ready
P100001334961Ready
P100001336642Ready
P100002334942Not Ready
P100002334956Not Ready
P100002334961Not Ready
P100002336642Not Ready
P100003334943Not Ready
P100003334961Not Ready
P100003336642Not Ready

 

In this example, P100001 is the only product that is ready because it has the required SKUs, and in correct Quantity.

P100002 is not ready, because SKU# 33494 has only 2 parts qty instead of required 3. P100003 is also not ready because it's missing a SKU altogether.

 

Any pointers on how I can create a column for Build Status? Thanks

 

1 ACCEPTED SOLUTION
BekahLoSurdo
Resolver IV
Resolver IV

Hi @RustyNails,

 

I created a column ("Quantity Audit") and a measure ("Build Status_Calculated"):

Quantity Audit = SWITCH(
    TRUE(),
    'Table'[SKU] = 33494 && 'Table'[Qty] = 3, 1,
    'Table'[SKU] = 33495 && 'Table'[Qty] = 6, 1,
    'Table'[SKU] = 33496 && 'Table'[Qty] = 1, 1,
    'Table'[SKU] = 33664 && 'Table'[Qty] = 2, 1,
    0 
)
Build Status_Calculated = IF( 
    CALCULATE( 
        SUMX( 'Table', 'Table'[Quantity Audit] ), 
        ALLEXCEPT( 'Table', 'Table'[Build Order ID] ) 
    ) = 4, 
    "Ready", 
    "Not Ready"
)

The column checks if each row meets its unique quantity requirements and the measure checks if each Build Order ID has enough qualified rows.

Build Status.PNG

Hope this helps!

Bekah

 

View solution in original post

2 REPLIES 2
BekahLoSurdo
Resolver IV
Resolver IV

Hi @RustyNails,

 

I created a column ("Quantity Audit") and a measure ("Build Status_Calculated"):

Quantity Audit = SWITCH(
    TRUE(),
    'Table'[SKU] = 33494 && 'Table'[Qty] = 3, 1,
    'Table'[SKU] = 33495 && 'Table'[Qty] = 6, 1,
    'Table'[SKU] = 33496 && 'Table'[Qty] = 1, 1,
    'Table'[SKU] = 33664 && 'Table'[Qty] = 2, 1,
    0 
)
Build Status_Calculated = IF( 
    CALCULATE( 
        SUMX( 'Table', 'Table'[Quantity Audit] ), 
        ALLEXCEPT( 'Table', 'Table'[Build Order ID] ) 
    ) = 4, 
    "Ready", 
    "Not Ready"
)

The column checks if each row meets its unique quantity requirements and the measure checks if each Build Order ID has enough qualified rows.

Build Status.PNG

Hope this helps!

Bekah

 

 Worked flawlessly. Thank you!

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.