dbTalk Databases Forums  

Employee Count in HR Cube

microsoft.public.sqlserver.olap microsoft.public.sqlserver.olap


Discuss Employee Count in HR Cube in the microsoft.public.sqlserver.olap forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Hash
 
Posts: n/a

Default Employee Count in HR Cube - 08-16-2006 , 04:43 AM






Hi All

I want the distinct count of employee in organization till current date
(from first member of year level upto currently selected year).
I have MSAS 2000.

I have dimensions:
Time
Action(Hire,terminated,Promotion)
Age
location
Company-Dept
Grade
employee


Plz Help me.

Quote:
From Hash


Reply With Quote
  #2  
Old   
Jéjé
 
Posts: n/a

Default Re: Employee Count in HR Cube - 08-16-2006 , 06:47 AM






try something like:
count(nonemptycrossjoin(employes.employeeID.member s,
{time.year.members(0):time.currentmember}, measures.[anycount or sum
measure],1))

you have to count the number of members in the employe dimension and then do
a dynamic distinct count calculation.

"Hash" <harshal.patil (AT) sify (DOT) com> wrote

Quote:
Hi All

I want the distinct count of employee in organization till current date
(from first member of year level upto currently selected year).
I have MSAS 2000.

I have dimensions:
Time
Action(Hire,terminated,Promotion)
Age
location
Company-Dept
Grade
employee


Plz Help me.

From Hash




Reply With Quote
  #3  
Old   
SAM
 
Posts: n/a

Default Re: Employee Count in HR Cube - 08-16-2006 , 01:50 PM



Jeje,
I have a similar problem I want to count the number of clients (accounts)
for any given dimension or filter.

COUNT({[Account Name].[Account Name].MEMBERS }, Excludeempty)

However I am getting #ERR as the value. At first without stating the
excludeempty I got a value but it wasn't dynamic when I changed the filter
(dice/slice) in the cube browser. Any ideas?

"Jéjé" wrote:

Quote:
try something like:
count(nonemptycrossjoin(employes.employeeID.member s,
{time.year.members(0):time.currentmember}, measures.[anycount or sum
measure],1))

you have to count the number of members in the employe dimension and then do
a dynamic distinct count calculation.

"Hash" <harshal.patil (AT) sify (DOT) com> wrote in message
news:1155721379.777146.208440 (AT) 75g2000cwc (DOT) googlegroups.com...
Hi All

I want the distinct count of employee in organization till current date
(from first member of year level upto currently selected year).
I have MSAS 2000.

I have dimensions:
Time
Action(Hire,terminated,Promotion)
Age
location
Company-Dept
Grade
employee


Plz Help me.

From Hash





Reply With Quote
  #4  
Old   
Jéjé
 
Posts: n/a

Default Re: Employee Count in HR Cube - 08-17-2006 , 07:12 AM



you are right, I have ommit the exclude_empty keyword...

your formula count the number of account without specifying any measure to
restrict the list
try:
COUNT(
crossjoin([Account Name].[Account Name].MEMBERS, measures.[anycountmeasure])
, Excludeempty)

this is good but slow with large amount of accounts.
this one perform better, but can provide unexpected results when the user
use the pivottable, due to the cache:
COUNT(
crossjoin(
nonemptycrossjoin([Account Name].[Account Name].MEMBERS,
{measures.[anycountmeasure]},1)
,measures.[anycountmeasure])
, Excludeempty)

(make sure that the cube with the count measure is aggregated at the lowest
level for the accounts and the higher level for the other dimension)

also you can greatly improve the performance of these calculation by palying
with the cache ratio and cache policy option in your connection string:
cache policy=7;cache ratio=0.001;data source=myserver....

"SAM" <SAM (AT) discussions (DOT) microsoft.com> wrote

Quote:
Jeje,
I have a similar problem I want to count the number of clients (accounts)
for any given dimension or filter.

COUNT({[Account Name].[Account Name].MEMBERS }, Excludeempty)

However I am getting #ERR as the value. At first without stating the
excludeempty I got a value but it wasn't dynamic when I changed the filter
(dice/slice) in the cube browser. Any ideas?

"Jéjé" wrote:

try something like:
count(nonemptycrossjoin(employes.employeeID.member s,
{time.year.members(0):time.currentmember}, measures.[anycount or sum
measure],1))

you have to count the number of members in the employe dimension and then
do
a dynamic distinct count calculation.

"Hash" <harshal.patil (AT) sify (DOT) com> wrote in message
news:1155721379.777146.208440 (AT) 75g2000cwc (DOT) googlegroups.com...
Hi All

I want the distinct count of employee in organization till current date
(from first member of year level upto currently selected year).
I have MSAS 2000.

I have dimensions:
Time
Action(Hire,terminated,Promotion)
Age
location
Company-Dept
Grade
employee


Plz Help me.

From Hash







Reply With Quote
  #5  
Old   
SAM
 
Posts: n/a

Default Re: Employee Count in HR Cube - 08-17-2006 , 09:14 AM



Hi Jeje thanks. Is there a way when there are no values to return a blank
instead of 0?

"Jéjé" wrote:

Quote:
you are right, I have ommit the exclude_empty keyword...

your formula count the number of account without specifying any measure to
restrict the list
try:
COUNT(
crossjoin([Account Name].[Account Name].MEMBERS, measures.[anycountmeasure])
, Excludeempty)

this is good but slow with large amount of accounts.
this one perform better, but can provide unexpected results when the user
use the pivottable, due to the cache:
COUNT(
crossjoin(
nonemptycrossjoin([Account Name].[Account Name].MEMBERS,
{measures.[anycountmeasure]},1)
,measures.[anycountmeasure])
, Excludeempty)

(make sure that the cube with the count measure is aggregated at the lowest
level for the accounts and the higher level for the other dimension)

also you can greatly improve the performance of these calculation by palying
with the cache ratio and cache policy option in your connection string:
cache policy=7;cache ratio=0.001;data source=myserver....

"SAM" <SAM (AT) discussions (DOT) microsoft.com> wrote in message
news63DC3DA-582C-44BC-8754-47B52F30F13B (AT) microsoft (DOT) com...
Jeje,
I have a similar problem I want to count the number of clients (accounts)
for any given dimension or filter.

COUNT({[Account Name].[Account Name].MEMBERS }, Excludeempty)

However I am getting #ERR as the value. At first without stating the
excludeempty I got a value but it wasn't dynamic when I changed the filter
(dice/slice) in the cube browser. Any ideas?

"Jéjé" wrote:

try something like:
count(nonemptycrossjoin(employes.employeeID.member s,
{time.year.members(0):time.currentmember}, measures.[anycount or sum
measure],1))

you have to count the number of members in the employe dimension and then
do
a dynamic distinct count calculation.

"Hash" <harshal.patil (AT) sify (DOT) com> wrote in message
news:1155721379.777146.208440 (AT) 75g2000cwc (DOT) googlegroups.com...
Hi All

I want the distinct count of employee in organization till current date
(from first member of year level upto currently selected year).
I have MSAS 2000.

I have dimensions:
Time
Action(Hire,terminated,Promotion)
Age
location
Company-Dept
Grade
employee


Plz Help me.

From Hash








Reply With Quote
  #6  
Old   
Jéjé
 
Posts: n/a

Default Re: Employee Count in HR Cube - 08-17-2006 , 02:27 PM



create 2 calculated measures, the first one will do the calculation (and
will be hidden)
the second one will do a IIF(firstmeasure = 0, null, firstmeasure)

"SAM" <SAM (AT) discussions (DOT) microsoft.com> wrote

Quote:
Hi Jeje thanks. Is there a way when there are no values to return a blank
instead of 0?

"Jéjé" wrote:

you are right, I have ommit the exclude_empty keyword...

your formula count the number of account without specifying any measure
to
restrict the list
try:
COUNT(
crossjoin([Account Name].[Account Name].MEMBERS,
measures.[anycountmeasure])
, Excludeempty)

this is good but slow with large amount of accounts.
this one perform better, but can provide unexpected results when the user
use the pivottable, due to the cache:
COUNT(
crossjoin(
nonemptycrossjoin([Account Name].[Account Name].MEMBERS,
{measures.[anycountmeasure]},1)
,measures.[anycountmeasure])
, Excludeempty)

(make sure that the cube with the count measure is aggregated at the
lowest
level for the accounts and the higher level for the other dimension)

also you can greatly improve the performance of these calculation by
palying
with the cache ratio and cache policy option in your connection string:
cache policy=7;cache ratio=0.001;data source=myserver....

"SAM" <SAM (AT) discussions (DOT) microsoft.com> wrote in message
news63DC3DA-582C-44BC-8754-47B52F30F13B (AT) microsoft (DOT) com...
Jeje,
I have a similar problem I want to count the number of clients
(accounts)
for any given dimension or filter.

COUNT({[Account Name].[Account Name].MEMBERS }, Excludeempty)

However I am getting #ERR as the value. At first without stating the
excludeempty I got a value but it wasn't dynamic when I changed the
filter
(dice/slice) in the cube browser. Any ideas?

"Jéjé" wrote:

try something like:
count(nonemptycrossjoin(employes.employeeID.member s,
{time.year.members(0):time.currentmember}, measures.[anycount or sum
measure],1))

you have to count the number of members in the employe dimension and
then
do
a dynamic distinct count calculation.

"Hash" <harshal.patil (AT) sify (DOT) com> wrote in message
news:1155721379.777146.208440 (AT) 75g2000cwc (DOT) googlegroups.com...
Hi All

I want the distinct count of employee in organization till current
date
(from first member of year level upto currently selected year).
I have MSAS 2000.

I have dimensions:
Time
Action(Hire,terminated,Promotion)
Age
location
Company-Dept
Grade
employee


Plz Help me.

From Hash










Reply With Quote
  #7  
Old   
SAM
 
Posts: n/a

Default Re: Employee Count in HR Cube - 08-25-2006 , 02:49 PM



Hi Jeje,

I am trying to use the second formula that you suggested for the performance
because you were right, performance is slow. However, I am gettiing 0 zero
results for the second one. Any ideas?

"Jéjé" wrote:

Quote:
you are right, I have ommit the exclude_empty keyword...

your formula count the number of account without specifying any measure to
restrict the list
try:
COUNT(
crossjoin([Account Name].[Account Name].MEMBERS, measures.[anycountmeasure])
, Excludeempty)

this is good but slow with large amount of accounts.
this one perform better, but can provide unexpected results when the user
use the pivottable, due to the cache:
COUNT(
crossjoin(
nonemptycrossjoin([Account Name].[Account Name].MEMBERS,
{measures.[anycountmeasure]},1)
,measures.[anycountmeasure])
, Excludeempty)

(make sure that the cube with the count measure is aggregated at the lowest
level for the accounts and the higher level for the other dimension)

also you can greatly improve the performance of these calculation by palying
with the cache ratio and cache policy option in your connection string:
cache policy=7;cache ratio=0.001;data source=myserver....

"SAM" <SAM (AT) discussions (DOT) microsoft.com> wrote in message
news63DC3DA-582C-44BC-8754-47B52F30F13B (AT) microsoft (DOT) com...
Jeje,
I have a similar problem I want to count the number of clients (accounts)
for any given dimension or filter.

COUNT({[Account Name].[Account Name].MEMBERS }, Excludeempty)

However I am getting #ERR as the value. At first without stating the
excludeempty I got a value but it wasn't dynamic when I changed the filter
(dice/slice) in the cube browser. Any ideas?

"Jéjé" wrote:

try something like:
count(nonemptycrossjoin(employes.employeeID.member s,
{time.year.members(0):time.currentmember}, measures.[anycount or sum
measure],1))

you have to count the number of members in the employe dimension and then
do
a dynamic distinct count calculation.

"Hash" <harshal.patil (AT) sify (DOT) com> wrote in message
news:1155721379.777146.208440 (AT) 75g2000cwc (DOT) googlegroups.com...
Hi All

I want the distinct count of employee in organization till current date
(from first member of year level upto currently selected year).
I have MSAS 2000.

I have dimensions:
Time
Action(Hire,terminated,Promotion)
Age
location
Company-Dept
Grade
employee


Plz Help me.

From Hash








Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.