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
debiagui
Helper II
Helper II

Create a Measure with an indirect relation

Hi I need help to create a measure to summarize the sales for an employee, but in my scenario, I've some cases where the employee has customers assigned but in some cases the employee has a sales area or a channel or a any geografic customer data.

My model has four tables.

One for customers with gographic info

One for sales by period and by customer

One fo employee

And one with the relation for an employee and customers or geografic.

My idea is create a table or matrix that shows the total sales for the associate related his relation with customers o terrotories.

1 ACCEPTED SOLUTION
v-henryk-mstf
Community Support
Community Support

Hi @debiagui ,

 

Your statement seems a bit vague, whether the four tables provided are correct and whether there is a relationship between them. Can you give an example, such as how 57,418 corresponding to 1 of EmployeeId in the result is obtained. I will answer you as soon as possible.

vhenrykmstf_0-1626773196690.png

 

Looking forward to your reply.


Best Regards,
Henry

 

View solution in original post

5 REPLIES 5
v-henryk-mstf
Community Support
Community Support

Hi @debiagui ,

 

Your statement seems a bit vague, whether the four tables provided are correct and whether there is a relationship between them. Can you give an example, such as how 57,418 corresponding to 1 of EmployeeId in the result is obtained. I will answer you as soon as possible.

vhenrykmstf_0-1626773196690.png

 

Looking forward to your reply.


Best Regards,
Henry

 

Greg_Deckler
Super User
Super User

@debiagui Sorry, having trouble following, can you post sample data as text and expected output?
Not really enough information to go on, please first check if your issue is a common issue listed here: https://community.powerbi.com/t5/Community-Blog/Before-You-Post-Read-This/ba-p/1116882

Also, please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490

The most important parts are:
1. Sample data as text, use the table tool in the editing bar
2. Expected output from sample data
3. Explanation in words of how to get from 1. to 2.


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

Sorry about this, @Greg_Deckler, I create a simple example in Excel here:

https://file.io/Z17ZEEiPDBMF

Hope this helps.-

Says deleted.


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

Here we are 🙂

Employee

EmployeeIdEmployeeName
1A
2B
3C
4D

Customers:

CustomerIdCustomerNameCountryChannelTerritory
1AArgentinaSupermarketA
2BChileSupermarketB
3CArgentinaE-CommerceC
4DChileSupermarketF
5CArgentinaC-StoreD
6DArgentinaC-StoreD

Relations:

EmployeeIdCountryChannelTerritoryCustomerId
1Argentina   
2ChileSupermarket  
3ArgentinaC-StoreD5
4ChileSupermarketF 
3ArgentinaC-StoreD6

Sales:

YearMonthCustomerIdSalesAmount
2021January1 $          5,599.00
2021January2 $          1,387.00
2021January3 $          8,944.00
2021January4 $          7,512.00
2021January5 $          8,660.00
2021January6 $          9,247.00
2021February1 $          2,220.00
2021February2 $          1,121.00
2021February3 $          3,196.00
2021February4 $                40.00
2021February5 $             463.00
2021February6 $          2,860.00
2021March1 $          7,114.00
2021March2 $          5,461.00
2021March37,073.00

 

Result

SalesAmount

EmployeeIdEmployeeNameSalesAmount
1A 57,418
2B 40,740
3C 25,275
4D15,370

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.