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

The Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.

Reply
TTS
Frequent Visitor

Product BOM modeling, measures and matrix visual

I have "flattened" my bom structure to one table with columns like this:

TTS_0-1692545517382.png


I have product table (like item data) for attribute values (like std price) by part:

TTS_1-1692545587608.png


Now:
I am able to create a hierarchy from partid_level columns - and it is working: when I select mainitem I am able to see the parts under it in matrix visual:

TTS_2-1692546069246.png


What I need now: 
1. way to show qty for each part based on the qty_level columns

2. std price value from my item table for each part

3. measure to calculate qty_level x std_price

Anyone?

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@TTS , For That you can have measure like

 

Sumx(Table, Table[Qty] * Table[Price])

 

if price is in master(1-m Join)

 

Sumx(Table, Table[Qty]* realted(Item[Price]) )

 

Because you have different levels, Use isinscope to switch such levels, Lowest level first

 

IsInScope - Switch Rank at different levels: https://youtu.be/kh0gezKICEM

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

3 REPLIES 3
omkar28
Frequent Visitor

Hi users, @amitchandak , @TTS 

Great that you got required output.
But I want to know how do modelled the tables there because when you join mainitem (BOM table) with PART (DIM_PARTS), you will get the same price of mainitems for part levels of that mainitem.
Expectation is to get price of part level items in the matrix.

amitchandak
Super User
Super User

@TTS , For That you can have measure like

 

Sumx(Table, Table[Qty] * Table[Price])

 

if price is in master(1-m Join)

 

Sumx(Table, Table[Qty]* realted(Item[Price]) )

 

Because you have different levels, Use isinscope to switch such levels, Lowest level first

 

IsInScope - Switch Rank at different levels: https://youtu.be/kh0gezKICEM

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Hi @amitchandak 

And great thanks for Your message; I was too close to see it clearly from my data model point of view.
I made few changes and was able to avoid sumx by using hierarchy values and by creating enough measures...and then switch ( true () ... to get correct measure to correct level.

TTS_0-1692618478767.png


Logic works...now it is time to check values. 
Great thanks! 💪



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!

Feb2025 Sticker Challenge

Join our Community Sticker Challenge 2025

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

Feb2025 NL Carousel

Fabric Community Update - February 2025

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