Forum Discussion

SteveIOW's avatar
SteveIOW
Icon for Helper II rankHelper II
4 years ago
Solved

TOPN doesn't work as a filter

Good morning.   I have used  WorstModTrend = TOPN ( 1 , VALUES ( Modalities[Modality] ), CALCULATE([Avg Rise (M)]) , DESC ) to identify the modality with the worst trend. I now want to identify...
  • SteveIOW's avatar
    SteveIOW
    4 years ago

    Think I have done it myself - by taking a completely different approach.

     

    WorstTrend = MAXX(SUMMARIZE(Modalities, Modalities[Modality], "Rise", LinearRegTable[Avg Rise (M)]), LinearRegTable[Avg Rise (M)])
     
    I'm sure there is a better way although this gives the right answer. If anyone can give me the another way I will be interested.
     
    Cheers