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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
jdubs
Helper V
Helper V

How to create a list of Sub-Accounts where the Sales Rep is different than the Master account

In Dynamics 365 there is a parent account relationship. I want to be able to show accounts where the Sales Rep (or "Owner") on any of the sub accounts is different than what's on the Master. I already split the account table up into two tables, Master and Sub but not sure where to go from here. 

1 ACCEPTED SOLUTION
AnalyticsWizard
Solution Supplier
Solution Supplier

To analyze the ownership of master accounts versus sub-accounts in Dynamics 365 using Power BI, you will need to establish a relationship between your Master and Sub account tables and then create a measure or calculated column to compare the owners. Here’s a step-by-step approach to tackle this:

 

1. Establish Relationships:
- Make sure there is a common key between the Master and Sub tables that can be used to create a relationship in Power BI. Typically, this could be an Account ID or Parent Account ID.
- In Power BI, go to the Model view and create a one-to-many relationship from the Master (one) to the Sub (many) table using the common key.

 

2. Create a Measure or Calculated Column:
- You will then create a DAX measure or calculated column to compare the Owner of the Master account with the Owners of the Sub accounts. A calculated column could be more straightforward for filtering and visual identification.
- Here’s an example of what the DAX for a calculated column might look like:

```dax
Owner Mismatch =
VAR MasterOwner = RELATED(Master[Owner])
RETURN
IF(
MasterOwner <> Sub[Owner],
"Mismatch",
"Match"
)
```

- In this example, `Master[Owner]` is the column from the Master table that contains the Sales Rep for the master account, and `Sub[Owner]` is the column from the Sub table that contains the Sales Rep for the sub-account.
- The `RELATED` function is used to pull the corresponding owner from the Master table based on the established relationship.
- The `IF` statement compares the two owners and returns "Mismatch" if they are different and "Match" if they are the same.

 

3. Visualize the Data:
- Now, you can create a visual in Power BI that includes both Master and Sub account details along with the new `Owner Mismatch` column.
- You might use a matrix or table visual to display the account names/IDs along with the corresponding owners from both tables and the `Owner Mismatch` calculated column.

 

4. Apply Filters:
- To focus on the accounts where there is a mismatch, you can apply a filter to your visual to only show rows where `Owner Mismatch` equals "Mismatch".

 

5. Review and Interpret:
- Review the filtered list to identify where the ownership between Master and Sub accounts differs.
- This list can now be used by your sales team or account managers to investigate and address any discrepancies in account ownership.

Remember to refresh your Power BI report to reflect the latest data from Dynamics 365 regularly, ensuring that ownership comparisons are up to date.

View solution in original post

2 REPLIES 2
jdubs
Helper V
Helper V

That's perfect Mr. Wizard. I had something similar but without the RELATED function so it was just giving me positive results regardless of whether they matched or not.

 

Thank you!

AnalyticsWizard
Solution Supplier
Solution Supplier

To analyze the ownership of master accounts versus sub-accounts in Dynamics 365 using Power BI, you will need to establish a relationship between your Master and Sub account tables and then create a measure or calculated column to compare the owners. Here’s a step-by-step approach to tackle this:

 

1. Establish Relationships:
- Make sure there is a common key between the Master and Sub tables that can be used to create a relationship in Power BI. Typically, this could be an Account ID or Parent Account ID.
- In Power BI, go to the Model view and create a one-to-many relationship from the Master (one) to the Sub (many) table using the common key.

 

2. Create a Measure or Calculated Column:
- You will then create a DAX measure or calculated column to compare the Owner of the Master account with the Owners of the Sub accounts. A calculated column could be more straightforward for filtering and visual identification.
- Here’s an example of what the DAX for a calculated column might look like:

```dax
Owner Mismatch =
VAR MasterOwner = RELATED(Master[Owner])
RETURN
IF(
MasterOwner <> Sub[Owner],
"Mismatch",
"Match"
)
```

- In this example, `Master[Owner]` is the column from the Master table that contains the Sales Rep for the master account, and `Sub[Owner]` is the column from the Sub table that contains the Sales Rep for the sub-account.
- The `RELATED` function is used to pull the corresponding owner from the Master table based on the established relationship.
- The `IF` statement compares the two owners and returns "Mismatch" if they are different and "Match" if they are the same.

 

3. Visualize the Data:
- Now, you can create a visual in Power BI that includes both Master and Sub account details along with the new `Owner Mismatch` column.
- You might use a matrix or table visual to display the account names/IDs along with the corresponding owners from both tables and the `Owner Mismatch` calculated column.

 

4. Apply Filters:
- To focus on the accounts where there is a mismatch, you can apply a filter to your visual to only show rows where `Owner Mismatch` equals "Mismatch".

 

5. Review and Interpret:
- Review the filtered list to identify where the ownership between Master and Sub accounts differs.
- This list can now be used by your sales team or account managers to investigate and address any discrepancies in account ownership.

Remember to refresh your Power BI report to reflect the latest data from Dynamics 365 regularly, ensuring that ownership comparisons are up to date.

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

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