Forum Discussion

rlussky's avatar
rlussky
Icon for Helper I rankHelper I
4 years ago
Solved

Top N or Rank Dynamic By Date

Hello, I am struggling to create a summation of values by top 5 states that is dynamic by date.   On the left in my screenshot is a table of data, while the red section on the right is a summary th...
  • Anonymous's avatar
    Anonymous
    4 years ago

    rlussky I'm seeing different top states than you listed above in your data, but how about something like this:

    TOP  5 States = 
    VAR _TopStates = TOPN(5, 'Table',[Balance Measure])
    VAR _Result = CALCULATE([Balance Measure],_TopStates)
    RETURN
    _Result