Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
hello,
I want to sum up all Values of the dimension MaxRound but the each Name should be only
MaxRound | Name |
4 | Detlef |
4 | Detlef |
3 | Pia |
3 | Mike |
2 | Petra |
2 | Petra |
so my sum should be: (4+3+3+2) and not (4+4+3+3+2+2). how can I add in the formular "Distinct Name"
Aggr(sum(MaxRound), distinct Name) is not working
Thanks for help
Pia
@peisenrot I tried something at the script level first. Please see the script below:
NoConcatenate
Table:
load * inline [
MaxRound, Name
4, Detlef
4, Detlef
3, Pia
3, Mike
2, Petra
2, Petra]
;
NoConcatenate
Table1:
Load *,
if(Name=Previous(Name) and MaxRound=Previous(MaxRound),'Duplicate','Not Duplicate') as Check
Resident Table;
Drop table Table;
Exit script;
In the front End: Sum({<Check={'Not Duplicate'}>}MaxRound)
Please like and accept it as a solution if this resolves your issue.
How about
Sum(Aggr(Max(MaxRound), Name))
-Rob
@peisenrot try below
=sum(aggr(sum(distinct MaxRound), Name))
You can try this too.
=Sum(Aggr(Only(MaxRound), Name))
@peisenrot I tried something at the script level first. Please see the script below:
NoConcatenate
Table:
load * inline [
MaxRound, Name
4, Detlef
4, Detlef
3, Pia
3, Mike
2, Petra
2, Petra]
;
NoConcatenate
Table1:
Load *,
if(Name=Previous(Name) and MaxRound=Previous(MaxRound),'Duplicate','Not Duplicate') as Check
Resident Table;
Drop table Table;
Exit script;
In the front End: Sum({<Check={'Not Duplicate'}>}MaxRound)
Please like and accept it as a solution if this resolves your issue.