question

gwhelan87 avatar image
gwhelan87 asked

MDX filter last periods where Month exists

Hi I have been trying to work out a solution to this problem for a couple of days now but I am relatively new to Analysis Services. I have a query that selects the number of responses (measure), ports (dimension) for the last 2 month periods (dimension) 1. It is acceptable if there is no data for previous month 2. If there is no data for the most recent month then the port is to be ignored Here is my query which works for some ports and not others SELECT NON EMPTY { [Measures].[Responses] } ON COLUMNS, NON EMPTY FILTER ( { [Port].[Port].[Port] * LASTPERIODS(2, STRTOMEMBER("[Time].[Month].&[2013-05-01T00:00:00]")) }, STRTOMEMBER("[Time].[Month].&[2013-05-01T00:00:00]")) ON ROWS FROM [Cube] I'm pretty sure my logic isn't correct but I've been trying out using EXISTS, sub queries, WHERE clauses and this is the closest I have came to a resolution. Thanks in advance Graham
mdxquery-resultsdatefilterexists
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

0 Answers

·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.