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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Syndicate_Admin
Administrator
Administrator

Find the fashion from an id list and then relate those ids to a product name

Hello, could you help me with this problem? I have a sales list where the product sold is specified with an id, I want to know the name of the best-selling product. That is to say that once the fashion is found (it can be more than one) in the sales table, I need that id to be related to the table of products that has the id and the name, to obtain from this the name that has to be entered in a text.

Thanks a lot!

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi  @Syndicate_Admin ,

I created some data:

Table1:

vyangliumsft_0-1678757840125.png

Table2:

vyangliumsft_1-1678757840126.png

 

Here are the steps you can follow:

1. Create measure.

 

Flag1 =
SUMX(
    FILTER(ALL('Table'),'Table'[ID]=MAX('Table'[ID])),[Value])
Flag2 =
var _max=
MAXX(
    ALL('Table'),[Flag1])
return
IF(
    [Flag1]=_max,
    MAXX(FILTER(ALL(Table2),'Table2'[ID]=MAX('Table'[ID])),[Product]),BLANK())

 

2. Result:

vyangliumsft_0-1678757921508.png

 

If I have misunderstood your meaning, please provide your desired output and your pbix file without privacy information.

 

Best Regards,

Liu Yang

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

1 REPLY 1
Anonymous
Not applicable

Hi  @Syndicate_Admin ,

I created some data:

Table1:

vyangliumsft_0-1678757840125.png

Table2:

vyangliumsft_1-1678757840126.png

 

Here are the steps you can follow:

1. Create measure.

 

Flag1 =
SUMX(
    FILTER(ALL('Table'),'Table'[ID]=MAX('Table'[ID])),[Value])
Flag2 =
var _max=
MAXX(
    ALL('Table'),[Flag1])
return
IF(
    [Flag1]=_max,
    MAXX(FILTER(ALL(Table2),'Table2'[ID]=MAX('Table'[ID])),[Product]),BLANK())

 

2. Result:

vyangliumsft_0-1678757921508.png

 

If I have misunderstood your meaning, please provide your desired output and your pbix file without privacy information.

 

Best Regards,

Liu Yang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.