Forum Discussion

sam_nik12345's avatar
sam_nik12345
Helper II
4 years ago

Power BI BOM data model

Need help to create a model in Power BI based on my BOM and forecast data sample? My objective is to connect the model with invetory and po to optimize procurement.

 

plantidforecastgoodscomponentqtytypegroup
x02xpo34567-pqxpo34567-pq0091234521special-223400.000xyzmetaA
x02xpo34567-pq qqqq48001234n0.006pqrmetaB
x02xpo34567-pq qqqq48023456t400.000abcmetaC
x02xpo34567-pq qqqq480123-223efg43.104abcmetaD
x02xpo34567-pq qqqq480dummy400.000abcmetaD
x02xpo34567-pq qqqq480water-1230.140abcmetaE
x02xpo34567-pq qqqq480apple-123118.000abcmetaF
x02xpo34567-pq qqqq480atom-123400.000abcmetaG
x02xpo89012-pcxpo89012-pc0091234522special-224400.000xyzmetaA
x02xpo89012-pc qqqq422coco-1230.006pqrmetaB
x02xpo89012-pc qqqq422cara-1230.042pqrmetaH
x02xpo89012-pc qqqq42201234n0.028pqrmetaI

 

Monthwise forecast

forecastJan-18Feb-18Mar-18Apr-18May-18
xpo34567-pq54269
xpo89012-pc61234

5 Replies

  • v-yingjl's avatar
    v-yingjl
    Community Support

    Hi sam_nik12345 ,

    Not certain what is your expected output based on the description.

     

    Please see this post regarding How to Get Your Question Answered Quickly:
    https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490

     

    You can merge these two tables based on id/forecast column to group data first.

     

    Best Regards,
    Community Support Team _ Yingjie Li
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

    • sam_nik12345's avatar
      sam_nik12345
      Helper II

      Hi v-yingjl 

       

      Below my tables; you will notice that, same matlr has multiple comp (tbl2) and comp is connected to forecast and inventory. How do I connect these tables to get matrl & comp level count.

       

      tbl1:

      forecastcompqty
      fore1comp15
      fore2comp25
      fore3comp35
      fore4comp45
      fore4comp55
      fore6comp65
      fore7comp75
      fore7comp85
      fore7comp95
      fore8comp105
      fore9comp115
      fore10comp125

       

      tbl2:

      matrlComponent
      matl1comp1
      matl1comp2
      matl1comp3
      matl1comp4
      matl1comp5
      matl1comp6
      matl1comp7
      matl1comp8
      matl1comp9
      matl2comp10
      matl2comp11
      matl2comp12
      matl2comp13
      matl2comp14

       

      forecast:

      forecastJan-18Feb-18Mar-18Apr-18May-18
      fore154269
      fore261234

       

    • sam_nik12345's avatar
      sam_nik12345
      Helper II

      Hi MFelix 

       

      Below my tables; you will notice that, same matlr has multiple comp (tbl2) and comp is connected to forecast and inventory. How do I connect these tables to get matrl & comp level count.

       

      tbl1:

      forecastcompqty
      fore1comp15
      fore2comp25
      fore3comp35
      fore4comp45
      fore4comp55
      fore6comp65
      fore7comp75
      fore7comp85
      fore7comp95
      fore8comp105
      fore9comp115
      fore10comp125

       

      tbl2:

      matrlComponent
      matl1comp1
      matl1comp2
      matl1comp3
      matl1comp4
      matl1comp5
      matl1comp6
      matl1comp7
      matl1comp8
      matl1comp9
      matl2comp10
      matl2comp11
      matl2comp12
      matl2comp13
      matl2comp14

       

      forecast:

      forecastJan-18Feb-18Mar-18Apr-18May-18
      fore154269
      fore261234

       

      I also have inventory, PO tables & GR tables. I want to calculate the total inventory, open PO for prourement planning.

       

       

  • Here I have simplified in two tables. Table 1 & 2 are from BOM data and split into two tables.

    Under one matrl there could be multiple forecast in table1

    table1:

    forecastmatrl
    fore1matrl1
    fore2matrl2
    fore3matrl3
    fore4matrl4
    fore5matrl5
    fore1matrl6
    fore1matrl7
    fore3matrl8
    fore3matrl9
    fore3matrl10

     

    I need to find out forecast for a certain matrl and aggregate that to component level to find out the available stock.

    Below table 2 contain matrl, comp and qty. I would like to join these two tables with my forecast table

    table2

    matrlComponentqty
    matrl1comp11
    matrl2comp21
    matrl3comp31
    matrl4comp41
    matrl5comp51
    matrl6comp61
    matrl7comp71
    matrl8comp81
    matrl9comp91
    matrl10comp101
    matrl11comp111
    matrl12comp121
    matrl13comp131

     

    Monthwise forecast

    forecastJan-18Feb-18Mar-18Apr-18May-18
    fore154269
    fore261234
  • Hi sam_nik12345 

    I belive you can have 3 tables. One table (Table1) with material IDs (unique). Second one is Bill of material (Table 2). Third one will be forecast table (Table 3). You can create relationship with Table 1 and 2. One more relationship with Table 2 and 3. All other calculations on foreast qty can be done in DAX.

     

    Thanks

    Thingsclump

    www.thingsclump.com