Thursday, 4 April 2013

Drag and drop will not work in SSAS Cube

Hi,

Today my trainees faced a strange issue, they were trying to drag and drop the deployed dimensional attribute in the cube browser and they were not able to do so. They also tried to right click on the attribute name and click on "Add to row" but it would fail.

To resolve this issue, I checked the server to which thier cubes were connected, i,e the Analysis services server. It was disconnected. when I reconnected it and asked my trainees to redploy, reconnecr and refresh, they were able to drag and drop attributes like before

SSAS - Grand total value is repeating or it is the same for every measure value

Hi,
I was teaching MSBI to my trainees and I noticed that the in the cube browser the Grand total value is repeating for all its measure values as shown in the below picture.




To resolve this error check your dimension structure under "Cube Structure" tab. Check if the dimension you are dragging and droping is diretly related to your fact table. If not then establish the relationship by clicking on "Dimension Usage" tab. I added the referenced relationship and bingo, it worked

Not getting unique values in Hierarchies - in dimension browser

Hi,
I was trying to create the DIM Geography using listed in Adventures Works DW and when I deploy this the browser will show me so many Country names as shown in the below screenshot




After worrying my head a lot on this issue, I realised that this happened as I had set key column even for EnglishCountryRegion name. Hence to resolve this issue, I came back to "Dimension Structure" tab>right click on "English Country Region Name">Click on properties>Come to "Keycolumn" and remove any other attributes added and make the EnglishCountryRegionName to be uinque. Check the below fig



 Deploy and then reconnect to get the final result

Monday, 1 April 2013

Trust relationship between the primary domain and trusted domain failed in analysis services

Hi,
I was teaching MSBI to my collegues and I could not make them deploy thier analysis services project on my server. I figured that I have to add thier names as admin and when I tried to do it, I get the above listed error message. To resolve this error message follow the below steps:

Right click on Analysis services server name >Click on Properties
Click on Security tab at the bottom.
If you are getting this error message then you should see the below screen



Delete the entry highlighted in yellow.
Now you would have lost your admin rights too..so quickly enter your login details to gain the admin rights . i,e click on ADD and then enter your own login details

Now continue adding other admin details

Bingo!!...It's working

Thursday, 14 March 2013

Error: The binary code for the script is not found. Please open the script in the designer by clicking Edit Script button and make sure it builds successfully.

Hi Folks,
I had new version of VS 2008 R2 installed. I tried to do my script task in VS. And  I was so dissapointed to get the below error message

"biError: The binary code for the script is not found. Please open the script in the designer by clicking Edit Script button and make sure it builds successfully."


But I managed to resolve this issue :)

If you are using 2008 or later you can try the below steps

Set the DelayValidation field to "TRUE"

This error happens if you have made wrong changes to the script task code. Copy paste your existing code to a notepad, get a new script task in your control flow and edit it in a way that you dont delete much from this new script task


If you are using 2005 you can try the below steps

Install hotfix from the below link

Set the Precompile property under the scripttask property as True

Monday, 24 December 2012

Macro to call another macro in another folder after closing all existing file and copy paste values

Hi All,
Below is the macro that will close existing open excel files and then copy paste values


Public Sub Macro1()
' Call another macro
Call test2
 
    Windows("Book1.xlsm").Activate
    Range("B1:B4").Select
    Selection.Copy
    Workbooks.Open Filename:="C:\Documents and Settings\S*****\My Documents\Macro\Book2.xlsx"
    lMaxRows = Cells(Rows.Count, "A").End(xlUp).Row
Range("A" & lMaxRows + 1).Select
Selection.PasteSpecial Paste:=xlPasteFormats, Operation:=xlNone, _
        SkipBlanks:=False, Transpose:=True
    Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
        :=False, Transpose:=True
    ActiveWorkbook.Save
    ActiveWorkbook.Close
   
End Sub
Public Sub test2()
    Dim path As Variant
    Dim excelfile As Variant
    Dim WkbkName As Object
    path = "C:\Documents and Settings\S*****\My Documents\Macro\"
    excelfile = Dir("*.xlsx")
    Do While excelfile <> ""
           
          Application.ScreenUpdating = False

          For Each WkbkName In Application.Workbooks()
'Do not close the existing workbook and the one with the name "Book1.xlsm" but close every other excel file
              If WkbkName.Name <> ThisWorkbook.Name And WkbkName.Name <> "Book1.xlsm" Then WkbkName.Close
          Next

          ' If everything runs all right, exit the sub.
          Exit Sub
    Loop
End Sub

Friday, 7 December 2012

SQL query to get the previous or last month data only

Hi folks,
Find below the query that fetches the previous month data only



Select * from EmpJD
Where evaluations.quality_date >= DATEADD(MONTH, DATEDIFF(MONTH, 31, getdate()), 0)
AND evaluations.quality_date < DATEADD(MONTH, DATEDIFF(MONTH, 0,  getdate()), 0)