Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I want to make a sum distinct of some values but I can't get right the statement. My table is like this:
Name Course Lesson Duration +other columns related to lesson
A Z 1 5
A Z 2 5
A Z 3 5
A Y 1 5
B Z 1 5
B W 1 3
I want to know the total duration of all the courses per Name, if I just sum the duration in the case of A for example it will tell me (5+5+5+5) but I only want (5+5) which corresponds to course A and Y. If I just put Sum distinct of duration in the case o A it gives me 5 and doesn't considerate both courses.
I want the following output:
Name TotalDuration
A 10
B 8
I wonder I have to make some magic on the script. I'm attaching the file. Thanks for your help
but I only want (5+5) which corresponds to course A and Y
Y is course???
Please clarify !
Does that mean you only wish to sum() where Lesson = 1 ?
Sorry, it was "which corresponds to course Z* and Y"
Thanks
You can use
=Sum(Aggr(sum(DISTINCT Duration),Nombre,Course))
this should work
sum(Aggr(sum(DISTINCT Duration),Course,Nombre))
Try: sum(aggr(max(Duration),Name,Course))
Hi,
try with expression:
=sum(aggr(DISTINCT Duration, Nombre, Course))
Regards.
Thank you!!! Apparently it was an easy question. My apologies, I'm new in QlikView