Forum Discussion

ROG's avatar
ROG
Icon for Responsive Resident rankResponsive Resident
2 years ago
Solved

bottom 5 dax not working

Hello Community,   The dax below supposed to give me the bottom 5 carriers + the remaining (Others). Bottom is this case means negative No of Port-Outs, so I was able to get the Top5, and added the...
  • Anonymous's avatar
    Anonymous
    2 years ago

    Hi ROG ,

     

    Based on the information you have provided, you can follow these steps:

    1.Add new column

     

    ranking =
    
    RANKX ( ALL ( 'Table' ), 'Table'[No Port-Outs],, DESC, DENSE )
    
    

     

    2.Add new column

     

    new carrier =
    
    IF ( 'Table'[ranking] <= 5, 'Table'[carrier], "Others" )

     

     

    3.Put in Matrix

    Final output:

     

     

    How to Get Your Question Answered Quickly - Microsoft Fabric Community

    If it does not help, please provide more details with your desired out put and pbix file without privacy information.

     

    Best Regards,

    Yifan Wang

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.