Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago

Look up text values from multiple different tables

Hello everyone,

 

I am very new to Power BI and this forum, so please excuse my potentially simple question or if this has been answered in the past or does not belong here.

 

I have 4 tables with different numbers of columns and rows, however they all share the same 'Status' column with either 'Completed' or 'Not Completed' as their (text) value. The rows indicate actions so that the 'Status' column is used to tick off the respective Action. For the sake of this question, let's call the tables A, B, C and D.

Basically, what I would like to achieve is to have a 100% stacked column chart that shows all four tables A, B, C and D as four different bars in one visual, with the percentage of Actions that are 'Completed' and 'Not Completed' for each of the for bars.

 

My guess is that to achieve this, I have to somehow create another table in Power BI that counts and consolidates the impressions of 'Completed' and 'Not Completed' for all four tables, but I might be completely off.

 

Any kind of help is very much appreciated! If you need any kind of further clarifications, please let me know.

 

Thank you so much in advance!


Best regards

4 Replies

  • Anonymous Yes, you have to have a table that may be called Status with one value for each status, in this case seems like you have two values only, and this table will connect to all other 4 tables with 1 to many relationships.

     

    In visual, use status from this status table and values measures from all other tables and it will all work out.

     

    Other options are to combine all these 4 tables (if possible) and that will be better and make things easier.

     

    I would  Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos whoever helped to solve your problem. It is a token of appreciation!

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hi parry2k thank you for your quick response! I have already created a 'Status' table with the two Status values 'Completed' and 'Not Completed' and connected them '1 to many' with all four tables, as you said. However, I'm afraid I did not understand how to now use the different columns and where to drag them in the visual.

      As far as I understand, I should drag the Status column from the new 'Status' table in the field for Legend? And in the value field, it only lets me drag one Status column from one of the four tables, if I want to drag in another it replaces the former.

       

      • parry2k's avatar
        parry2k
        Super User

        Anonymous not sure which visual you are using, assuming stacked bar chart,

         

        x-axis will be a status column

        values will be your aggregation column from all 4 tables and you will see the stack bar chart with 4 values, share the screen shot if it doesn't work.