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

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register 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
November Carousel

Fabric Community Update - November 2024

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

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

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! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

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