Open science opens minds
Monday, February 18, 2008

This problem arose from an analysis services (SSAS 2005) course I instructed last week. Since I am probably under NDA I can only reference the MSDN article which has the same example:

http://msdn2.microsoft.com/en-us/library/ms166553.aspx

In this example, we set up a dimension hierarchy and specify some attribute relationships. The problem surfaces if you try to use the dimension with a measure group - e.g Internet Sales - Total Sales.

The key point is that the subtotals for regions, countries etc are not the same before and after applying the relationships.

Moreover, the totals are correct before applying the relationships, and incorrect after (we checked this by executing SQL queries on the underlying datawarehouse).

Specifically, the problem occurs with customers who have the same name (e.g Jaime Hernandez)

There are 2 Jaime Hernandez - one in South Australia, one in Berkeley CA.

After applying the FullName- Postal Code attribute relationship, the Berkeley Sales figures go down, and up in the South Australia totals.

There are a couple of points - first, the relationships do not need to be applied in this example. The data is correct without them.

Secondly, be VERY careful with applying relationships. It can completely screw your data. I would imagine that if this surfaced to an end-user your datawarehouse project might come to an untimely end.

 

Monday, February 18, 2008 12:53:05 AM (GMT Standard Time, UTC+00:00) | Comments [1] | Analysis Services#

I needed to keep an Ajax modal dialog open until someone either clicked Cancel or clicked OK and had checked the "I accept the Terms and Condtions" dialog.

The solution turned out very straightforward:

In the OK button click handler, look to see if the checkbox is checked. Then find the ModalPopupExtender and call its Show() method.

This has the effect of keeping the Modal up (no flicker).

The painful bit is finding the modalPopupExtender in the control hierarchy.

Here is my code (C#)

protected void btnOK_Click(object sender, EventArgs e)

{

   if (chkAccept.Checked == false)

   {

    

      Button btnOK = (Button)sender;

      Panel pnlAccept = (Panel)btnOK.Parent;

      Panel pnlReportsDetail = (Panel)pnlAccept.Parent;

   AjaxControlToolkit.ModalPopupExtender mpe = (AjaxControlToolkit.ModalPopupExtender)pnlReportsDetail.FindControl   ("ModalPopupExtender");

   // The show method re-shows the modal dialog so it's in your face until you click Cancel or check the Accept checkbox

   mpe.Show();

}

else

{

ProcessPayment();

}

Monday, February 18, 2008 12:31:30 AM (GMT Standard Time, UTC+00:00) | Comments [2] | ASP.NET Ajax#
Monday, February 04, 2008

Just back from Sydney after the MCT summit. What a great time I had! Lots of great content from some very talented Aussies (I guess I'll have to make an effort next year and fly the flag for NZ. So I have a year to prepare that session...)

Some takeaways ..

An awful lot to learn about on SQL Server 2008

A very big chunk of VS2008/SQL 2008 Cert exams heading my way.

A lot of very passionate MCTs

So much beer, too little time...

 

Until next time, thanks guys :-)

 

 

Monday, February 04, 2008 7:10:28 AM (GMT Standard Time, UTC+00:00) | Comments [0] | MCT#
Search
Archive
Links
Categories
Admin Login
Sign In
Blogroll
Themes
Pick a theme: