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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
BiGhost12
New Member

Return Itemnumber when the ops and jobs match

I'm newer to power bi and especially bom structures. need some help understanding what i am missing. i have a production order table that has job number and a productionroute table that has job number and operation number. there is multiple op per job number. now im trying to make a matrix that allows you to go fromworkcenter to job number down to item level. workcenter is also in production route. problem im having is i cant get the item number to show from productionbom correctly. productionbom can have multiple items per operation or it could have no items for that operation. i still want to see the jobs/ops that dont have items attached but if they match up with production bom return the items numbers associated with the job/op. i have a sample file of made up data that is similar. 

BiGhost12_0-1730785727584.png

this example above for instance should only return test22 as the job numbers match but not all operations match. the small left table is just the bom table. 

BiGhost12_1-1730785850198.png

my second example is a job that should still show in the matrix just not return any itemnumber as there isn't one associated with that operation.


 My File , thanks in advance for any help.


 

1 ACCEPTED SOLUTION
v-xuxinyi-msft
Community Support
Community Support

Hi @BiGhost12 

 

Due to some security policy, I couldn't open the file you shared, so I created simple sample data to do the test for your reference:

My sample:

 

productionroute table:

vxuxinyimsft_0-1730873368082.png

 

production order table:

vxuxinyimsft_1-1730873461899.png

 

Measure:

Measure = 
VAR _ItemOperation = IF(MAX('production order'[Operation]) = MAX('productionroute'[Operation]) && MAX('production order'[job Number]) = MAX('productionroute'[Job Number]), 1, 0) 
VAR _Operation = CALCULATE(MAX('productionroute'[Operation]), FILTER('productionroute', _ItemOperation = 1)) 
RETURN 
_Operation


Output:

vxuxinyimsft_2-1730873546523.png


If your problem persists, you can either paste the sample data directly into the post or present it as a screenshot so I can better help you. How to provide sample data in the Power BI Forum - Microsoft Fabric Community Please remove any sensitive data in advance.

 

Best Regards,
Yulia Xu

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
v-xuxinyi-msft
Community Support
Community Support

Hi @BiGhost12 

 

Due to some security policy, I couldn't open the file you shared, so I created simple sample data to do the test for your reference:

My sample:

 

productionroute table:

vxuxinyimsft_0-1730873368082.png

 

production order table:

vxuxinyimsft_1-1730873461899.png

 

Measure:

Measure = 
VAR _ItemOperation = IF(MAX('production order'[Operation]) = MAX('productionroute'[Operation]) && MAX('production order'[job Number]) = MAX('productionroute'[Job Number]), 1, 0) 
VAR _Operation = CALCULATE(MAX('productionroute'[Operation]), FILTER('productionroute', _ItemOperation = 1)) 
RETURN 
_Operation


Output:

vxuxinyimsft_2-1730873546523.png


If your problem persists, you can either paste the sample data directly into the post or present it as a screenshot so I can better help you. How to provide sample data in the Power BI Forum - Microsoft Fabric Community Please remove any sensitive data in advance.

 

Best Regards,
Yulia Xu

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.