0

I have 3 measures, and I want to add measure1 and measure2 and then subtract measure3 from the result. I'm unable to get the composite metric below to work. Any help would be appreciated.

subtract([
    sum([
        sum(s("measure1", "*")),
        sum(s("measure2", "*")),
    ]),
    sum(s("measure3", "*"))
])
Joel
  • 1,564
  • 7
  • 12
  • 20
Saurav
  • 1

1 Answers1

0

Figured out what the issue was. Missing the aggregate function within the series.

subtract([
    sum([
        s("measure1", "*", {function:"sum"}),
        s("measure2", "*", {function:"sum"})
    ]),
    s("measure3", "*", {function:"sum"})
])
Saurav
  • 1