Forum Discussion

G_FLORIO's avatar
G_FLORIO
Regular Visitor
2 years ago

how to delete rows in a viewer

I have the following table in view:

And I want remove for example:

For PRODUCT_CODE_1 I want to keep that the one with the maximum quantity_1 (first record) and for product_code_2  I want to keep that the one with the maximum quantity_2 ( fourt record in img, whit quantity2 is equal 9).

 

Is it possible to create a dax function that can do this?

 

Regards

Gianluca

 

1 Reply

  • G_FLORIO  Try this measure (I tried on my sample data)

     

    CALCULATE(MAX('TableName'[Sales]),ALLEXCEPT('TableName','TableName'[CustomerName]))