Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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:
But I'd want to not ignore subject selection, and get resulting numbers same to this expression.
Is it possible with Set Analysis?
Thanks all for your replies! I found solution:
Aggr(nodistinct sum({<subject={'*'}>} total <date, user, detail_id> count), date, user, detail_id)
If i am understand the correct, Then probably this?
sum({1<subject = >} total <date, user, detail_id> count)
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))
What's your expected output on selection?
Thanks all for your replies! I found solution:
Aggr(nodistinct sum({<subject={'*'}>} total <date, user, detail_id> count), date, user, detail_id)