Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Power Query - Get new or updated rows after overwriting exception values from one table to another

Hi,

 

I have 3 tables:

Mappings:

image.png

SFReport:

image.png

StudyReport:

image.png

 

Current Process (manual) :

- Analysts usually extract a list of unique Manager names and Team names from the `SFReport table` and append it below Mappings table.

- They then manually assign the Users to these Managers in the User column.

- They then add any exceptions in the Exception column for any `Manager - User` combination working on Accounts - the User needs to be replaced for that specific Account entered in exceptions. The format to determine which Accounts worked by which User is as e.g. `Acct1|Vincy,Acct2,Renu` i.e. `<Account name | User name>, <Account name | User name>` etc.

- This Mappings table is then merged back to the `SFReport table`, which should be a connection-only table that pulls external data into the query.

- The merge basically fills the `User` column with by looking up the Manager column

- It then checks the Accounts column of the `SFReport table` and sees if there are any exceptions for any `Manager - User` combination for that Account, then replaces the original User with the one given in exception.

e.g. If `Acct1 & Sidra - Zara` then change User Zara to Vincy`

N.B: This is only for new rows of `SFReport table` that may have that combination and not replace for earlier ones.

- Finally the `SFReport table` merges with the `StudyReport table` and dumps only new or updated rows to the `StudyReport table`.

Please note there may be multiple columns in between the columns show in the below Sample file in the StudyReport table.

 

Sample New File:

It contains all the tables & instructions for each table.

 

Can someone help me such an implementation? Any help will be most appreciated.

 

@AlexisOlson , @MarcelBeug @ImkeF 

3 REPLIES 3
Anonymous
Not applicable

@AlexisOlson hope you are doing fine.

Would you be able to help with the 1st part (as per the title of my post) i.e. self-referencing Mappings file and including the exceptions in the StudyReport? Regarding updated or new studies, you already showed me how to do it. So i would be able to do the latter part. Thanks in advance.

Sorry. This is a bit beyond the scope of question and answer for me.

Anonymous
Not applicable

Can anyone help with the 1st scenario i.e. Mappings as a self-referencing table that doesnt change the sort order of exceptions + updating those exceptions user names to the correct accounts based on the Manager - User combination?

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors
Top Kudoed Authors