Intellipaat Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in BI by (17.6k points)
edited by

I have three tables whose structure is as follows-

Table 1-

enter image description here

Table 2-

enter image description here

Table 3-

enter image description here

I wanted to have a table like this -

enter image description here

I tried this particular formula for creating a calculated table-

Table = UNION(SELECTCOLUMNS(Table1,"Table1", Tables[Table1]), SELECTCOLUMNS(Table2, "Table2 Totals", Table2[Totals]), SELECTCOLUMNS(Table3, "Table3 Totals", Table3[Totals]))

The result I am getting is like this:-

enter image description here

I have no idea why this is happening. What to do in this scenario? Do calculated columns not come in merge query?

Learn Power BI Course from this video : 

 

1 Answer

0 votes
by (47.2k points)

Data will in a normalized format in real-time but you might need the de-normalized data in some situations. In such situation, using a query editor in Power BI, you can combine those tables using a query editor.

You can merge the 3 tables into a new table to get the required output that you want.

Step 1:  Merge TABLE1, TABLE2.  ---------->     NEW TABLE    [ columns - Table2, Name ]

Step 2:  Select all column from TABLE1.  Select 1st and last column of TABLE2 IN THE NEW TABLE.

Step 3:  Merge TABLE3, NEW TABLE  ------------->   NEW TABLE.     [ columns - Table3, Name ]

Step 4:  Select only 1st column from TABLE 1 And last columns of TABLE  2, TABLE 3.

Step 5:  You will get the required result.image

Want to learn more about Power BI, Come & join Power BI tutorial. Also, enroll in Power BI Certification online to become proficient in this BI tool.

Related questions

31k questions

32.8k answers

501 comments

693 users

Browse Categories

...