Day 1: Conquer the Power BI Interview Challenge
Q1. we have two tables with almost similar rows in it. Table1 contains 6 rows and Table2 contain 4 rows as shown below.
Requirement- Need to generate a new table which contain all additional rows which are not in second table
Table1: a,b,c,d,e,f
Table2: c,d,e,f
Required result: a,b
Solution:
We can solve this question in two ways:
1. In Power query editor:
Step1: Need to perform merge operation by selecting merge as new under home tab.
Step2: select the columns name with matching traits from both tables.
Step3: select left anti(rows only in first) option under join kind.
Step4: It will create new table with all the rows which are not there in second table.
Step5: Delete additional created column.
2. Using DAX query:
You can use one dax called Except:
Final Table = Except(Table1,Table2)
Planning to take 100 days challenge where i will be covering 100 different scenario based Power BI interview questions.
Day1:
Recommended by LinkedIn
Q1. we have two tables with almost similar rows in it. Table1 contains 6 rows and Table2 contain 4 rows as shown below.
Requirement- Need to generate a new table which contain all additional rows which are not in second table
Table1: a,b,c,d,e,f
Table2: c,d,e,f
Required result: a,b
Solution:
I have two solution to tackle this problem:
1. In Power query editor:
Step1: Need to perform merge operation by selecting merge as new.
Step2: select the columns name with matching traits.
Step3: select left anti option from join kind.
Step4: It will create new table with all the rows which are not there in second table.
2. Using DAX query:
you can use one dax called Except:
Final Table = Except(Table1,Table2)
Returns the rows of the first table in the expression which do not appear in the second table.
Please let me know your viewpoints how we can streamline this series so that it can help our family.