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
Aniket_Bhande
Frequent Visitor

I need this result

customer    product    quntity

c1                P1                20 

c1                P2                  30

c2                P3                 290

c2                 P4             110 

c2                P5                  60

         

 

 

RESULT I WANT

 

 

customer   product    quntity

c1             p2             30  

c2             p3            290

1 ACCEPTED SOLUTION
v-yangliu-msft
Community Support
Community Support

Hi  @Aniket_Bhande ,

 

Here are the steps you can follow:

1. Create measure.

Flag =
var _max=
MAXX(FILTER(ALL('Table'),[customer]=MAX('Table'[customer])),[quntity])
return
IF(
    MAX('Table'[quntity]) =_max,1,0)

2. Place [Flag]in Filters, set is=1, apply filter.

vyangliumsft_0-1669965631701.png

3. Result:

vyangliumsft_1-1669965631704.png

 

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

6 REPLIES 6
v-yangliu-msft
Community Support
Community Support

Hi  @Aniket_Bhande ,

 

Here are the steps you can follow:

1. Create measure.

Flag =
var _max=
MAXX(FILTER(ALL('Table'),[customer]=MAX('Table'[customer])),[quntity])
return
IF(
    MAX('Table'[quntity]) =_max,1,0)

2. Place [Flag]in Filters, set is=1, apply filter.

vyangliumsft_0-1669965631701.png

3. Result:

vyangliumsft_1-1669965631704.png

 

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

AilleryO
Memorable Member
Memorable Member

Hi,

 

This should do the trick :

SUMMARIZECOLUMNS( Data[Customer] , "Max Qty" , MAX( Data[Qty] ), "Prod" , MAX( Data[Product] ) )
Use it in a function, or as a new table.
Let us know if it works 

its not work

Hi,

 

It does work if you use it as a new table, not as a new measure or column.

Otherwise you can try the solution of @v-yangliu-msft .

Let us know what is best solution for you

SEE ThisSEE This

Hi,

 

Not 100% sure about your need, but replace MAX by MIN and you should have expected result :

SUMMARIZECOLUMNS( Data[Customer] , "Max Qty" , MAX( Data[Qty] ), "Prod" , MIN( Data[Product] ) )

Let us know 

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