Forum Discussion

mangal999's avatar
mangal999
Frequent Visitor
4 years ago
Solved

Top 3 records

Hello Everyone,

I am looking for a solution where I want to display top records count wise. Can you please help me. I have posted data below.

 

Product NumberProduct NameSub ProductCount of Sub Product
80.3.1Capacitor Aluminum PolymerCircuit Breaker Accessories7
80.6.1Capacitor AluminumCircuit Breakers5
80.3.3.2Capacitor Ceramic MultilayerFuse Accessories4
80.4.1Capacitor Ceramic Single LayerFuses3
80.5.1.2Capacitor Electric Double Layer- SupercapsPTC Resettable Fuses3
80.5.1.3Capacitor Feed ThroughPTC Resettable Fuses2
80.6.1Capacitor FilmSurge Suppressors2
80.5.1.3Mica CapacitorsThyristor Surge Protection Devices1
80.4.1Capacitor NiobiumSpeech Network1
  • Top N filter in the filter pane should work:

    Count Sub-Product = 
    SUM(SampleTable[Count of Sub Product])

     

7 Replies

  • Hi,

     

    You can try to get top 3 from the Filters.

    The following example shows the top 3 name by measure.

     

    Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!

     

    Best Regards,

    Preeti

    • mangal999's avatar
      mangal999
      Frequent Visitor

      No Preeti, TopN from filter is not working.

  • PaulDBrown's avatar
    PaulDBrown
    Icon for Community Champion rankCommunity Champion

    Top N filter in the filter pane should work:

    Count Sub-Product = 
    SUM(SampleTable[Count of Sub Product])

     

  • mangal999's avatar
    mangal999
    Frequent Visitor

    Hello Everyone, Can someone provide the solution on my request. Thank in advance.

     

    Regards,

  • Hi,

    Drag Sub product to the row labels of the matrix visual and write these measures

    Subproduct count = sum(Data[Count of Sub Product])

    Top 3 Subproduct count = calculate([Subproduct count],top(3,all(data[sub product]),[Subproduct count]),values(data[sub product]))

    Hope this helps.

     

    • mangal999's avatar
      mangal999
      Frequent Visitor

      Ashish_Mathur , SubProduct column is string type so we can not sum the column. I have tried with count as well but its not working.

      • Ashish_Mathur's avatar
        Ashish_Mathur
        Icon for Super User rankSuper User

        Hi,

        In the Query Editor, change the Data type of that column to Numeric.