Forum Discussion

dsalony's avatar
dsalony
Helper I
4 years ago
Solved

Indexing a value

I have data that has a value that has two attributes: the value is '# of people' one attribute is Building Name other attribute is Leader Name   so something like this: the column 'prim...
  • v-jianboli-msft's avatar
    4 years ago

    Hi dsalony ,

     

    Please try:

     

     

    Primary =
    
    var _maxpeople = MAXX(FILTER('Table',[Building]=EARLIER('Table'[Building])),[People])
    
    return MAXX(FILTER('Table',[Building]=EARLIER('Table'[Building])&&[People]=_maxpeople),[Leader])

     

     

     

    Output:

     

    Best Regards,

    Jianbo Li

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