Sherry Li's BI Corner
MDX #28– Time functions will not work with subquery
I had a post last month, MDX #25 – Slicer or Sub-Cube?, verifying that the query context did not change with the subquery.
This can pose problems if you want to use the Time-series functions in MDX. Two functions come into mind, YTD() and PeriodsToDate().
Both functions need to… Read more
0 comments, 255 reads
Posted in Sherry Li's BI Corner on 22 March 2013
MDX #27–Who are Ascendants?
Many function names in MDX are very family-friendly. Children, parent, ancestors, descendants, ascendants, are all terms we often use in telling family stories. Except ascendants. I never really understand what this word means until I ran into this word in MDX.
Ancestors VS. Ascendants
I checked the www.thefreedictionary.com, and… Read more
0 comments, 293 reads
Posted in Sherry Li's BI Corner on 2 March 2013
MDX #26 – SSN can only be referenced as a member property in MDX
I’ve blogged about the Properties() function before.
MDX #11 – How to get number of cars each customer owned using Properties() function?
MDX #12 – Do not forget the TYPED flag in the Properties() function
The Properties() function is used to explore the attribute relationships in a dimension.
If… Read more
0 comments, 533 reads
Posted in Sherry Li's BI Corner on 21 February 2013
MDX #25 – Slicer or Sub-Cube?
Slicer, Axes and Calculations Can All Filter Data in MDX
Every developer with SQL background knows how the WHERE clause works. You put some condition in the WHERE clause, such as TheDate = Yesterday (pseudo code), and it will only return data for yesterday.
Not so straightforward in MDX. We… Read more
2 comments, 667 reads
Posted in Sherry Li's BI Corner on 8 February 2013
MDX #24 – Leave out a dimension member using Except() Function
Functions such as NonEmpty(), Filter() and Exists() must use a numeric expression
Many of the MDX functions, such as NonEmpty(), Filter() and Exists(), seem to be easy enough to use, but they present quite a challenge for people with T-SQL background. The common theme among them is that they all… Read more
0 comments, 95 reads
Posted in Sherry Li's BI Corner on 17 January 2013
SSRS #73 – Use Calculated Field to Dynamically Set Default for Parameters
Calculated Field has existed in Reporting Services since version 2005. SSRS 2005 did not have the most attractive user interface design, so this pretty useful feature stayed hidden from me until version 2008.
Even in SSRS 2008, I did not pay much attention to it until I started to write… Read more
0 comments, 276 reads
Posted in Sherry Li's BI Corner on 4 January 2013
MDX #23 – “Hello World!” Lesson in MDX
Almost every tool we learned has some sort of “Hello World!” tutorial lesson.
So here comes the “Hello World!” lesson in MDX.
Putting “Hello World!” directly on the X axis doesn’t work
You would think this query would work, by putting “Hello World!” directly on the X axis.
Unfortunately it… Read more
0 comments, 92 reads
Posted in Sherry Li's BI Corner on 3 December 2012
MDX #22 – What to use for explicit sorting on dimensions
I often think that I am lucky to work in a profession that I enjoy very much. It makes everything I do a fun thing to do. Majority of the fun comes from the fact that I have my hands in almost every aspect of building a data warehouse. From… Read more
0 comments, 75 reads
Posted in Sherry Li's BI Corner on 3 December 2012
MDX #21 – Days in a month
ParallelPeriod() function is very useful when we need to present data side-by-side for two parallel periods
ParallelPeriod() function is often used when we need to present data side-by-side for two parallel periods, such as in the example below where daily data needs to be presented side-by-side for each day in… Read more
0 comments, 70 reads
Posted in Sherry Li's BI Corner on 22 November 2012
MDX #20 – Last Data Date
Need to check the last time when our ETL processes ran successfully
Data warehouse developers routinely query the last data date (the last date when we have fact data) to check the last time when our ETL processes ran successfully.
It’s not hard to do it in TSQL. It just… Read more
1 comments, 72 reads
Posted in Sherry Li's BI Corner on 22 November 2012
SSIS C Sharp #115 – C# Script to detect delta
A reader asked me to share a C Sharp script I used in this post, SSIS #114 – How many ways can you do INSERT-UPDATE?.
This code snippet tried to determine if the original value of MyFirstColumn is different or not compared to the incoming data in the pipeline.… Read more
1 comments, 85 reads
Posted in Sherry Li's BI Corner on 3 November 2012
MDX #19 – There is more to do to concatenate row values into column
Continuing from MDX #18 – Easy to concatenate row values into column in MDX.
I have not accomplished the goal of concatenating the set of top resellers in each country.
Count() function can count the number of tuples in a set
In this query, I am adding a count… Read more
0 comments, 75 reads
Posted in Sherry Li's BI Corner on 19 October 2012
SSAS #28 – Setup to Learn SSAS Stored Procedures
Having worked with SSAS for a while and done some reporting with MDX queries, I started to explore opportunities to write SSAS “stored procedures”. I stumbled on a few blocks along the way to even set up the development environment properly before I got chance to identify scenarios to justify… Read more
0 comments, 100 reads
Posted in Sherry Li's BI Corner on 16 October 2012
MDX #18 – Easy to concatenate row values into column in MDX
Concatenating row values (within groups) into column in SSRS and TSQL
Concatenating row values into column is a never ending topic for report developers. It should be a simple task. That is, if the rows are not within groups. If the rows you are about to concatenate are customers in… Read more
0 comments, 104 reads
Posted in Sherry Li's BI Corner on 7 October 2012



Subscribe to this blog