I am trying to get the Top 2 units by company here. Table is called 'Table (3)'
I want to be able to populate the column like this -
I had tried Column = RANKX(ALLEXCEPT('Table (3)','Table (3)'[Company]),SUM('Table (3)'[Units]))
but got a circular error.
The other way I think of doing this - not very effective - is use the TOPN and do a UNION by each company so each company would have a table of it's own TOPN value.
I know how to do this on power query already using Table.MaxN but want to do this on DAX