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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Anonymous
Not applicable

Qty items counted accross multiple bins

Hello

 

I have 5950  items in a warehouse spread accross 9657 bins. At the moment the calculations show how many bins have been counted, how do I calculate how many items have been fully counted? 

So 1 item may have 20 bin locations but only 19 of those locations may have been counted therefore the item is not fully counted, but if another item has 20 bin locations and all of those locations have been counted then the item is fully counted. How do I show the qty of items which have all it's bins counted?

 

whouse file.JPG

Thanks 

Bailey14

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi Icey

 

Unfortunately it's not worked, however I've created a seperate table for each warehouse using a pivot table to create the correct values.

I really appreaciate your time trying to fix this though.

 

Kind regards

 

Bailey14

View solution in original post

8 REPLIES 8
amitchandak
Super User
Super User

@Anonymous ,Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.

Anonymous
Not applicable

Hi

 

Not sure if this would help? This particular item has several different locations but not all the locations have been counted, therefore the item is not fullt counted. See 'counted' column

sample whse data.JPG

Icey
Community Support
Community Support

Hi @Anonymous ,

 

Please check if this is what you want:

Is Counted All Bins Measure =
VAR ItemBins_ =
    CALCULATE (
        COUNT ( 'Table'[Bin Code] ),
        ALLEXCEPT ( 'Table', 'Table'[Item No.] )
    )
VAR CountedItemBins_ =
    CALCULATE ( SUM ( 'Table'[counted] ), ALLEXCEPT ( 'Table', 'Table'[Item No.] ) )
RETURN
    IF ( ItemBins_ - CountedItemBins_ = 0, 1 )
qty of items which have all it's bins counted Measure =
CALCULATE (
    DISTINCTCOUNT ( 'Table'[Item No.] ),
    FILTER (
        ALLSELECTED ( 'Table' ),
        [Is Counted All Bins Measure] = 1
    )
)

 

 

Best regards

Icey

 

If this post helps, then consider Accepting it as the solution to help other members find it faster.

Anonymous
Not applicable

Hello Icey

 

I have tried the measure but I don't really understand what tables should go where within it,

I'm expecting to see this

MDC = 2870 counted

UK web  = 3544 counted

IE web = 363 counted

But I'm getting this

count 1.JPG

So I'm sure I'm not putting the right tables into your measure

This is how I've done it

count2.JPGcount3.JPG

Here is the link to the file

Icey
Community Support
Community Support

Hi @Anonymous ,

 

Try this: don't use ALLSELECTED in the below measure:

qty of items which have all it's bins counted Measure =
CALCULATE (
    DISTINCTCOUNT ( 'Table'[Item No.] ),
    FILTER (
        'Table' ,   -------------------------------------don't use ALLSELECTED()
        [Is Counted All Bins Measure] = 1
    )
)

 

 

Best regards

Icey

 

If this post helps, then consider Accepting it as the solution to help other members find it faster.

Anonymous
Not applicable

Hello again

 

I think we're getting nearer to the solution, I'm getting these results now which are better but not quite the number I am expecting

whse error1.JPG

Web UK should be 4493

MDC should be 2874

Web IE is correct at 364

 

The difference between the WEB IE warehouse is that there is only 1 bin per item, the other two warehouses can have multiple bins per item. 

 

These are the measures which are in place now

iscount measure.JPGCount measure.JPG

 

Kind Regards

Bailey14

Icey
Community Support
Community Support

Hi @Anonymous ,

 

If so, how about using COUNT instead of DISTINCTCOUNT?

qty of items which have all it's bins counted Measure =
CALCULATE (
    COUNT ( 'Table'[Item No.] ),                 -----------Use COUNT
    FILTER (
        'Table' ,   
        [Is Counted All Bins Measure] = 1
    )
)

 

 

Best regards

Icey

 

If this post helps, then consider Accepting it as the solution to help other members find it faster.

Anonymous
Not applicable

Hi Icey

 

Unfortunately it's not worked, however I've created a seperate table for each warehouse using a pivot table to create the correct values.

I really appreaciate your time trying to fix this though.

 

Kind regards

 

Bailey14

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

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.