Forum Discussion

brian0782's avatar
brian0782
Helper II
4 years ago
Solved

Top N Subtotal Not Appearing

Hi, I am trying to show the sum for the Top N Insured Names but not able to get the sum part actually working.

 

The totals for each Insured Name is working but the subtotal row is wrong as it's just picking up the "total row"- I think this is because it's rank 1 which is not by design

 

Sample data:

 

Class

InsuredRank by Binder 100% EPI CNV and Insured NameBinder 100% EPI by Class and InsuredTop N Binder 100%
CYBERCYBER G1   44,354,838.76     44,354,838.76
CYBERCYBER D2   37,903,225.81     37,903,225.81
CYBERCYBER A3   23,387,096.80     23,387,096.80
CYBERCYBER P4     8,064,516.15       8,064,516.15
CYBERCYBER L5     4,032,258.06       4,032,258.06
CYBERCYBER H6     1,209,677.42 
CYBERCYBER F7     1,184,727.27 
CYBERCYBER S8        474,375.00 
CYBERCYBER V9        227,272.72 
CYBERCYBER X10        150,000.00 
CYBERCYBER J11        124,378.11 

 

Power BI is showing:

 

RANKX DAX is: 

Rank by Binder 100% EPI CNV and Insured Name = RANKX(ALL(Main[Insured Name]), [Binder 100% EPI by Class and Insured])

 

Top N DAX is:

 

Top N Binder 100% =
VAR m = [Rank by Binder 100% EPI CNV and Insured Name]
RETURN
CALCULATE(([Binder 100% EPI by Class and Insured]), FILTER(Main, m<=5))
  • Anonymous's avatar
    Anonymous
    4 years ago

    Hi brian0782 ,

     

    There is an easier solution.

    You can filter as follows

     

     

     

    Best Regards,

    Stephen Tao

     

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

1 Reply

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi brian0782 ,

     

    There is an easier solution.

    You can filter as follows

     

     

     

    Best Regards,

    Stephen Tao

     

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