Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have a question regarding a problem I'm struggeling with.
The example below is a small subset of the real data, but the problem is the same.
The tabel loaded consists of 4 Columns: Name, Week, Day, Kg.
I want to create a table with a layout like this:
For every Name I want to know the Sum of Kg that intersect on Day of the Total(Excluding himself).
outcome:
James : 81645
John : 25635
Michel: 94520
The days that James should sum are 19-4-2019,20-4-2019(because of John) and 15-4-2019(because of Michel)
And if I filter James and John, I want it to be:
James : 62622
John : 25635
I tried something like this:
Sum Kg if the day is also in the Total set
sum( Aggr(
sum( if( count(Total distinct aggr(Name,Day)>1 ,Kg)))
,Name,Day)
)
But without succes.
After somemore investigation
I think I found the answer.
But please correct me if I'm wrong, or if there's an easier way to do it!
sum(
{$<Day = {"=count(aggr(count(total distinct Name),Name,Day)) > 1"
} >}
Kg)
Basicly it states:
For the current selection give me the days that have more then 1 distinct Name's in the total selection.
More then 1 because the name of the current row is also in the Total.