Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
badger123
Resolver I
Resolver I

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 volume based on the Text selected. 

 

Desired output in table visual:

IDCategory
Item OneC
Item TwoD

 

Table 1: 

IDTextCategory
Item Onetext oneA
Item Onetext twoA
Item Onetext threeA
Item Onetext fourB
Item Onetext fiveB
Item Onetext sixB
Item Onetext sevenC
Item Onetext eightC
Item Onetext nineC
Item Twotext tenA
Item Twotext oneA
Item Twotext twoC
Item Twotext elevenD
Item Twotext twelveE

 

Table 2:

TextVolume
text one10
text two20
text three30
text four40
text five10
text six20
text seven30
text eight90
text nine100
text ten50
text eleven200
text twelve10
1 ACCEPTED SOLUTION
Zubair_Muhammad
Community Champion
Community Champion

@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],
    ","
)

View solution in original post

1 REPLY 1
Zubair_Muhammad
Community Champion
Community Champion

@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],
    ","
)

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors