Forum Discussion

NAOS's avatar
NAOS
Advocate III
8 years ago
Solved

Relations between tables

Hi everyone,

 

I'm fairly new to Power BI and I'm stuck with modeling my data.

 

I got three tables,

 

One with energy production data for different countries and years by Product (Coal, Nucler, Natural gas, Renewables, etc) and another column with the flows of that energy (Imports,Exports, Domestic production, Transformation, Final consumption, etc).

 

The second column also contains the country name and year column but with the amount of electricity produced by each country during each year.

 

The third table contains the CO2 emissions by country and by year.

 

I could connect the three tables with a fourth table containing the countries' names, but I can't get to relate them by year.

 

Any suggestions?

 

Thanks in advanced,

 

NAOS

  • Hi NAOS,

     

    Based on your explanation the best way would be to do a table with countries and another one with a calendar and make the relatioinship between these two tables and the other 3.

     

    Check this link to create a calendar table on Power BI, however if you google it you will get lot's of different ways to make calendar tables in DAX or M language.

     

    Regards,

    MFelix

     

     

2 Replies

  • Hi NAOS,

     

    Based on your explanation the best way would be to do a table with countries and another one with a calendar and make the relatioinship between these two tables and the other 3.

     

    Check this link to create a calendar table on Power BI, however if you google it you will get lot's of different ways to make calendar tables in DAX or M language.

     

    Regards,

    MFelix

     

     

    • NAOS's avatar
      NAOS
      Advocate III

      Hi MFelix,

      Thanks a lot for your answer. It worked well.

      Kind regards,

       

      NAOS