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

measure that displays only the amount of the largest suppliers for each client

Good afternoon, dear friends, I need to calculate a measure that displays only the amount of the largest suppliers for each client.

1. first group the sales table by customers of its suppliers and the sales amounts for each customer.
2. from the table of paragraph 1, select the largest amounts of sales for each supplier and the supplier itself
3. make a measure that when creating a list of suppliers showed the amount by which it is large for each supplier

 

 

sample to forum power bi picture 1.jpg

1 ACCEPTED SOLUTION
v-piga-msft
Resident Rockstar
Resident Rockstar

Hi @Anonymous,

 

Assuming that the second table is your data sample ang the third table is your expected, then you could create the two measures below to achieve your desired output.

 

 

Measure =
CALCULATE (
    MAX ( 'Table2'[Amount] ),
    ALLEXCEPT ( Table2, 'Table2'[Supplier], 'Table2'[Customer] )
)

 

Supp = LOOKUPVALUE('Table2'[Supplier],'Table2'[Amount],[Measure])

Here is the output.

 

Capture.PNG

 

Best  Regards,

Cherry

Community Support Team _ Cherry Gao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
v-piga-msft
Resident Rockstar
Resident Rockstar

Hi @Anonymous,

 

Assuming that the second table is your data sample ang the third table is your expected, then you could create the two measures below to achieve your desired output.

 

 

Measure =
CALCULATE (
    MAX ( 'Table2'[Amount] ),
    ALLEXCEPT ( Table2, 'Table2'[Supplier], 'Table2'[Customer] )
)

 

Supp = LOOKUPVALUE('Table2'[Supplier],'Table2'[Amount],[Measure])

Here is the output.

 

Capture.PNG

 

Best  Regards,

Cherry

Community Support Team _ Cherry Gao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

Hello v-piga-msft !!!

and how to immediately make measures from the first table, without grouping the totals in the table two, while the amount of sales was all for the period?

 

sample to forum power bi picture 2.jpg


I tried to do through summarize and then through MAXX, but the result is wrong?

I do not want to use a physical table in the model because I need a dynamic measure ...

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.