Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
harleen_singh
Creator III
Creator III

repeating aggr value in straight table

I Have a straight table like this. I want to repeat values in a column which is total of Asia+America using expression

let say if i use this formula  aggr( count(distinct EmpID),Year). it only returns one value .i.e 35 and 70 but doesn't repeat same in all the columns?

Any ideas?

   

YearRegion HeadcountTotal
2016Asia1535
2016America2035
2015Asia3070
2015America4070

thanks

1 Solution

Accepted Solutions
sunny_talwar

Ruben, is this not going to work?

Count(Distinct TOTAL <Year> EmpID)

View solution in original post

14 Replies
Anonymous
Not applicable

what is your expected Output? you want 105 for both years and both continents?

settu_periasamy
Master III
Master III

try this

count(distinct Total EmpID)

rubenmarin

Hi Harleen, the Aggr parameter is 'Year' so it will return one value for each year, and each row will get the value of his year:

- Rows with Year=2016 get '35'

- Rows with year=2015 get '70'

If you want '105' on all rows the expression given by Settu should work.

nagarjuna_kotha
Partner - Specialist II
Partner - Specialist II

For above data what is ur expected output ?

sunny_talwar

May be like this:

Count(TOTAL <Year> Headcount)

sunny_talwar

Or this


Count(Distinct TOTAL <Year> EmpID)

sunny_talwar

Or you can do like this with Aggr()

Aggr(NODISTINCT Count(Distinct EmpID), Year)

harleen_singh
Creator III
Creator III
Author

Output i want is following. Total row you see here is the output i needed.

YearRegionHeadcountTotal
2016Asia1535
2016America2035
2015Asia3070
2015America4070
antoniotiman
Master III
Master III

Try

RangeSum(Top(Sum(Headcount),1,NoOfRows()))