Forum Discussion

Jorgast's avatar
Jorgast
Icon for Resolver II rankResolver II
8 years ago
Solved

Finding Max value in a group

Hi Everyone,   I am trying to run sales data and determine who got credit for the sale based on the date. I want to put this in a table to show where the originating agent and the final sales agent...
  • Anonymous's avatar
    Anonymous
    8 years ago

    Jorgast

    Create the following columns in your table.

    Original agent = CALCULATE(FIRSTNONBLANK(Table[Sale Agent Name],""), FILTER(Table, Table[Customer Name]=EARLIER(Table[Customer Name]) && Table[Date of sale]<EARLIER(Table[Date of sale])))

    checkcol = IF(Table[Original agent]<>BLANK() && Table[Sale Agent Name]<>Table[Original agent],1,0)

    Then set the value of checkcol to 1 in visual level filters.



    Regards,
    Lydia