Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
varunreddy
Creator III
Creator III

How to use concat in the variable

Hi All,

I have the field (A) and I have values B,C,D,E,F. I want to store all the values in the variable.  

I am trying to convert  

Sum({A = {'B','C','D','E','F'}Sales) 

to

Sum({<A = {'$(vtest)'}>}Sales)

Where vtest = {'B','C','D','E','F'}

If I select B, then I should get the data by B else I need to see all the values.

Is this possible?

Thanks,

Varun

 

1 Solution

Accepted Solutions
sunny_talwar

May be you need this?

Sum({<Z = p(A), A>}Sales)

View solution in original post

10 Replies
sunny_talwar

May be this

Sum({<A *= {'$(vtest)'}>}Sales)

varunreddy
Creator III
Creator III
Author

Hi Sunny,

Thanks for the quick reply.

How can I create the vtest?

vtest = concat('A',',')?

sunny_talwar

Is there a reason you want to create it using Concat?

varunreddy
Creator III
Creator III
Author

If nothing is selected, I wanted to select all the values. If they select the value, I want that value to be selected.

sunny_talwar

So, why can't you just use this?
Sum({<A *= {'B','C','D','E','F'}>} Sales) 

Why do you need Concat?

varunreddy
Creator III
Creator III
Author

If new value is added (i.e. If G is added), then it requires the manual effort. 

sunny_talwar

Lol, so why can't you just use Sum(Sales)? When nothing is selected, it will show the sum of sales for all A, but when one A is selected, it will show Sum of sales for just that A. Why do you need set analysis?

varunreddy
Creator III
Creator III
Author

Sorry for the confusion. I have renamed the field A as Z and using it in different table. But in the dashboard I am using A as the filter. If I select A, then few values are not displaying. So I thought if we create the variable and use it in the set expression, it will work.

Sum({<Z = {'$(vtest)'}, A>}Sales)

 

sunny_talwar

May be you need this?

Sum({<Z = p(A), A>}Sales)