Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
2 years ago
Solved

[ Joining 2 Tables with specif layout ]

Hello everyone, im trying to do find a better solution, than using cross join with all the context, any help is appreciated!!! All the columns on the 2 fact table, have dimensions with 1 to many relationships, connected to them.

ajuda power bi.xlsx

  • the solution maybe only work for this scenario. If we have more dates, e.g. 202402, then will not work. Let's see if anyone else can help you on this.

8 Replies

    • Anonymous's avatar
      Anonymous
      Not applicable

      ryan_mayu thks for the pbix file!!

       

      Its almost there, but i cant loose the data in yellow in the merge/append process. I need the full outter join (which you did), but i cant loose the [month data] / [vision] data in the process. Those 2 columns need to be repeated.

       

      [month data] contains near 700 [month bill acc] and every time i have a context existent in table 2 and no existent in table 1, i need to add that row for that [month bill acc] in table 1. The original table 1, have some years of [month data], each of them have repeated [month bill acc], and my difficult here is the sometimes table 2, has data not contained in table 1.

       

       

      • ryan_mayu's avatar
        ryan_mayu
        Icon for Super User rankSuper User

        pls provide the logic of getting the data. you must have different months in your real data. Then how can we know to display 202401 or 202402 or other month?