cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
RustyNails Regular Visitor
Regular Visitor

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

Accepted Solutions

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

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

 

2 REPLIES 2

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

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

 

RustyNails Regular Visitor
Regular Visitor

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

 Worked flawlessly. Thank you!

Helpful resources

Announcements
Back to School Contest

Back to School Contest

Engage and empower students with Power BI!

MBAS Gallery

Watch Sessions On Demand!

Continue your learning in our online communities.

Summit Australia 2019

Summit Australia 2019

Travel to Melbourne and network with thousands of peers!

PBI Community Highlights

PBI Community Highlights

Check out what's new in the Power BI Community!

Top Ideas
Users Online
Currently online: 106 members 1,459 guests
Please welcome our newest community members: