Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I'm trying to sum multiple fields when a certain condition is met. I've got a solution but I'm not happy with it, and was hoping I might be able to get a more elegant solution
Sum({<Condition = {"Batman"}>} dim_1) +
Sum({<Condition = {"Batman"}>} dim_2) +
Sum({<Condition = {"Batman"}>} dim_3) +
Sum({<Condition = {"Batman"}>} dim_4) +
Sum({<Condition = {"Batman"}>} dim_5) +
Sum({<Condition = {"Batman"}>} dim_6) +
Sum({<Condition = {"Batman"}>} dim_7) +
Sum({<Condition = {"Batman"}>} dim_8) +
Sum({<Condition = {"Batman"}>} dim_9) +
Sum({<Condition = {"Batman"}>} dim_10)+
Sum({<Condition = {"Batman"}>} dim_11) +
Sum({<Condition = {"Batman"}>} dim_12) +
Sum({<Condition = {"Batman"}>} dim_13)
Is there a way to write the above as a single expression?
Hi
All fields are coming from same table? If so,
Sum({<Condition = {"Batman"}>} dim_1+dim_2 + dim_3 + dim_4)
Awesome, thanks alot