Forum Discussion

emmawdmi22's avatar
emmawdmi22
Helper I
3 years ago
Solved

Take Max Value in Group Calculation if Multiple Values

In my report, I currently have a working measure called *Max Val (see below).  I have several devices that report at every timestamp. The calculation takes the sum of values for the devices at each t...
  • lbendlin's avatar
    lbendlin
    3 years ago
    Measure = 
    var a = summarize('Table',[device],[timestamp],"mx",max([Value]))
    var b = SUMMARIZE(a,[timestamp],"my",var d=[timestamp] return sumx(filter(a,[timestamp]=d),[mx]))
    return maxx(b,[my])