Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
8 years ago
Solved

Creating a table based on two tables

Hi,

 

I have two tables: PREVIOUS and CURRENT

 

 

 

I need to make this visualisation:

 

 

 

How do I put those two tables PREVIOUS and CURRENT together (if necessary) and how do I make this visualisation?

 

Thanks,

 

R.W.

 

 

  • Anonymous's avatar
    Anonymous
    7 years ago

    Thanks Dobregon for your reply.

     

    The two tables are imported from two Excel files

     

    I solved the problem in the end using a DAX expression

     

    COMPARE = UNION(CURRENT;PREVIOUS)

     

    R.W.

2 Replies

  • dobregon's avatar
    dobregon
    Icon for Impactful Individual rankImpactful Individual

    Hi,

     

    I have 2 options to you. 

     

    1. Info comming from SQL
      If the info is comming from SQL you can do a union of tables like
      SELECT
      ID,
      CODE,
      YEAR
      FROM PREVIOUS
      
      UNION 
      
      SELECT
      ID,
      CODE,
      YEAR
      FROM CURRENT
      Then you will have everthing in the same "table". Then you need to take a visual of columns
      X axis year
      Values Count of difernet codes.

    2. If you have both tables in the PowerBI desktop  you can select in the Edit querys the option of append queries like this link
      http://radacad.com/append-vs-merge-in-power-bi-and-power-query
      After that you will have everthing in one "table" and then you need to do the same than point 1

    Hope this help you

    • Anonymous's avatar
      Anonymous
      Not applicable

      Thanks Dobregon for your reply.

       

      The two tables are imported from two Excel files

       

      I solved the problem in the end using a DAX expression

       

      COMPARE = UNION(CURRENT;PREVIOUS)

       

      R.W.