Search code examples
tfsmdxolaptfs-reports

What goes into an MDX data cell by default?


MDX newbie here. I'm writing a query against the TFS 2015 Team Services OLAP cube to get the hang of it. So I write a query against the changesets and dates in November on a particular team project:

select non empty [Date].[Date].[Date] on 0,
non empty [Version Control Changeset].[Checked In By].[Checked In By] on 1
from [team system]
where ([Date].[Year - Month - Date Hierarchy].[Month].&[2017-11-01T00:00:00],
[Team Project].[Team Project Hierarchy].&[{00000000-1111-2222-3333-444444444444}])

I get a recordset with all people in TFS on rows, some days in Nov 2017 on columns (presumably ones when checkins took place), and some numbers in the cells. The numbers are the same in each row, but vary from one column to another.

In a query like this, where do the numbers come from? Any why are all the people in rows, and not just the ones who did the check-ins on the project? Not every person in the building has contributed to this project in November...


Solution

  • It's simply [Measures].DefaultMember, usually it's your first measure:

    select non empty [Date].[Date].[Date] * [Measures].DefaultMember on 0,
    non empty [Version Control Changeset].[Checked In By].[Checked In By] on 1
    from [team system]
    where ([Date].[Year - Month - Date Hierarchy].[Month].&[2017-11-01T00:00:00],
    [Team Project].[Team Project Hierarchy].&[{00000000-1111-2222-3333-444444444444}])