Forum Discussion

badger123's avatar
badger123
Icon for Resolver I rankResolver I
7 years ago
Solved

Need help with ranking / finding max category

Hi all, I just can't seem to figure out how to do this... please help!    I would like to display in a table visual ID and Category as columns, where the Category is that with the highest summed vo...
  • Zubair_Muhammad's avatar
    7 years ago

    badger123 

     

    Assuming Table1 (Many side) is related to Table 2 (One Side) using Text Column

    Try this Measure

     

    Measure =
    CONCATENATEX (
        TOPN (
            1,
            CALCULATETABLE ( VALUES ( Table1[Category] ) ),
            CALCULATE (
                SUM ( Table2[Volume] ),
                CROSSFILTER ( Table1[Text], Table2[Text], BOTH )
            ), DESC
        ),
        [Category],
        ","
    )