Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
mrbalyaqv
Contributor III
Contributor III

Excluded selection in set analysis

Hi all!

I use expression like this to calculate total count of views for all subjects in date, user, detail_id group:

 

sum({<subject = >} total <date, user, detail_id> count)

 

And it works just like it supposed to: ignores selected subject and calculates total count. Now if I select "subject 1" and "subject 2", my other expression is calculating only for them, and expression above – for all available subjects:

subjects.PNG

But I'd want to not ignore subject selection, and get resulting numbers same to this expression.

Is it possible with Set Analysis?

Labels (5)
1 Solution

Accepted Solutions
mrbalyaqv
Contributor III
Contributor III
Author

Thanks all for your replies! I found solution:

 

Aggr(nodistinct sum({<subject={'*'}>} total <date, user, detail_id> count), date, user, detail_id)

 

View solution in original post

4 Replies
Anil_Babu_Samineni

If i am understand the correct, Then probably this?

sum({1<subject = >} total <date, user, detail_id> count) 

 

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
Gysbert_Wassenaar

If I understand it correctly you want to see only two rows, only for subject 1 and subject2. And both rows should show 84 in the first expression column. If that's correct then what you really want to do is calculated the total outside of the context of the chart. That's possible by using a dollar expansion around the expression:

=$(=sum({<subject = >} total <date, user, detail_id> count))

talk is cheap, supply exceeds demand
shiveshsingh
Master
Master

What's your expected output on selection?

mrbalyaqv
Contributor III
Contributor III
Author

Thanks all for your replies! I found solution:

 

Aggr(nodistinct sum({<subject={'*'}>} total <date, user, detail_id> count), date, user, detail_id)