Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Counting rows based on attribute value

Status
Not open for further replies.

lukagent

Programmer
Aug 13, 2008
1
IT
Hi all, I'm quite new to mdx and i'm trying to count only those cells which have a given value in a certain attribute ... I've tried this:
Code:
with member [dept].[comandati fs] as
count(existing [emp].[fuori sede].&[1]))
select ([Time].[Periodo].[Giorno].&[2008-05-12T00:00:00],{[Measures]... ... ...}) on columns,
{{[dept].[comandati fs]}}
on rows 
from mycube
where (EXCEPT([dept].members,[NON VALID VALUES]),
       intersect([emp].[tipo personale].members,[valid employee types]),
      [dept].[country].&[I])

NB: in the last row of where clause i'm just doing the same (filtering only those depts whose country atribute is , buit it seems not to work with emps' [fuori sede] attribute
any idea?
Thanks in advance,

Luca
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top