Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
GrantBooth
Creator
Creator

Set Expression Assistance

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?

2 Replies
MayilVahanan

Hi

All fields are coming from same table? If so,

Sum({<Condition = {"Batman"}>} dim_1+dim_2 + dim_3 + dim_4)

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
GrantBooth
Creator
Creator
Author

Awesome, thanks alot