Forum Discussion

floralau's avatar
floralau
New Member
4 years ago
Solved

doughnut chart: top 3

What I have now is a doughnut chart with mainly two colors(i.e red and blue) and more than 10 values. and i would like to show the top 3 values of each color. or either to only show top 3 value's label.

 

Thank you!!

  • PC2790's avatar
    PC2790
    4 years ago

    See if this helps:

    Measureabcd =
    SUMX (
        TOPN (
            3,
            SUMMARIZE (
                ChannelTable,
                ChannelTable[Channel],
                "abcd", COUNT ( ChannelTable[Channel] )
            ),
            [abcd], DESC
        ),
        COUNT ( ChannelTable[Channel] )
    )
    

     

6 Replies

    • floralau's avatar
      floralau
      New Member

      Sorry, still a bit confused. 

      testing2 = TOPN(3,'Succesful Rate', 'Succesful Rate'[Channel])
      "Channel" include many things (e.g aaa, bbb, bbb, ccc)
       
      May i ask what's wring with it?
      • PC2790's avatar
        PC2790
        Icon for Community Champion rankCommunity Champion

        on what criteria you are basing your top three value?

        I can give you an example, suppose I want the top three based on the sum of the amounts across each country. I'll use:

        Top3 = sumx(TOPN(3,SUMMARIZE(CCY,CCY[CY],"abcd",SUM(CCY[Amount_in_USD])),[abcd],DESC),[abcd])

        You can try to mould it according to your requirement.Or provide with more details on the dataset so that we cna help you with it