﻿<?xml version='1.0' encoding='UTF-8'?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>SQLServerCentral / Data Warehousing / Analysis Services  / Count Comparison Month over Month - doesn't work when filtered / Latest Posts</title><generator>InstantForum.NET v2.9.0</generator><description>SQLServerCentral</description><link>http://www.sqlservercentral.com/Forums/</link><webMaster>notifications@sqlservercentral.com</webMaster><lastBuildDate>Sat, 18 May 2013 18:16:33 GMT</lastBuildDate><ttl>20</ttl><item><title>RE: Count Comparison Month over Month - doesn't work when filtered</title><link>http://www.sqlservercentral.com/Forums/Topic1371161-17-1.aspx</link><description>Is this not working for September Days 1 to 10 or are you looking for an aggregated view of September Days 1 to 10?  The query looks like it should work fine for each individual days...Mack</description><pubDate>Fri, 12 Oct 2012 08:43:16 GMT</pubDate><dc:creator>Mackers</dc:creator></item><item><title>RE: Count Comparison Month over Month - doesn't work when filtered</title><link>http://www.sqlservercentral.com/Forums/Topic1371161-17-1.aspx</link><description>Would be nice to have something more re-usable. I found this code with a google search, however is limited when drilling through Transaction Date dim, will not work when Year or Quarter selected. Do I need to create another calculated measure for these?? Seems to clutter up measures group fast and is not flexibleThanks in advance for any help,Chris</description><pubDate>Thu, 11 Oct 2012 13:01:34 GMT</pubDate><dc:creator>Chris Becker</dc:creator></item><item><title>Count Comparison Month over Month - doesn't work when filtered</title><link>http://www.sqlservercentral.com/Forums/Topic1371161-17-1.aspx</link><description>My first dive into MDX. I have a calculation which works when 2 entire months are compared. When I filter the Transaction Date to compare e.g. September Days 1 to 10 to October Days 1 to 10, this calc does not work. It still shows a difference in count of 30 days in September (entire month) vs October, so counts are ALL negative. How do I resolve? Tia!! Case// Test for current coordinate being on (All) member.When [Transaction Date].[Date Hierarchy].CurrentMember.Level Is[Transaction Date].[Date Hierarchy].[(All)]Then "NA"// Test to avoid division by zero.When IsEmpty((ParallelPeriod([Transaction Date].[Date Hierarchy].[Month],1,[Transaction Date].[Date Hierarchy].CurrentMember),[Measures].[Checks Count]))Then NullElse (( [Transaction Date].[Date Hierarchy].CurrentMember,[Measures].[Checks Count])-(ParallelPeriod([Transaction Date].[Date Hierarchy].[Month],1,[Transaction Date].[Date Hierarchy].CurrentMember),[Measures].[Checks Count]))End</description><pubDate>Wed, 10 Oct 2012 17:01:53 GMT</pubDate><dc:creator>Chris Becker</dc:creator></item></channel></rss>