
Hello,
I am trying to replicate an MDX query on Microsoft Analysis Services on Tableau, but I cannot get it to work using calculated members. The query - which works on MS SQL Server Management Studio - is:
SELECT TAIL(NONEMPTY([TIME].[Months].[Months]),3) ON COLUMNS,
NON EMPTY {([TACTEAM].[Level A].[Level A],[Measures].[Wght Ptf])} ON ROWS
FROM [MyCube]
WHERE [PORTFOLIO].[Portfolio Name].[Portfolio Name].[MyPortfolio]
This gets me the weights by strategy for my portfolio for the last 3 months of valid data.
On my Tableau worksheet I have [Time].[Months] on columns, [Measures].[Wght Ptf] on rows, [TACTEAM].[Level A].[Level A] on colour, [Measures].[Wght Ptf] on label. I am filtering by [Portfolio].[Portfolio Name].[Portfolio Name].
I have created the following calculated member on [Time].[Months]:
Check formula shows that it is valid.
When I try to drag the calculated member to the filter, and select "Last 3 months" I get no results in Tableau.
Can anybody help me?
Thanks,
Matthew