Thursday 15 March 2012

CELL WRITEBACK

Learn MSBI: DIMENSION WRITEBACK and CELL WRITEBACK in Analysis...: Like Dimension Writeback, there are limitations with Cell Writeback also. For enabling Cell Writeback, all measures should have aggregation as SUM in measure group. If measure group contains other aggregations like count, distinct count, max etc. then move them to separate measure group.

Cell Writeback is not possible using graphical user interface like we have for dimension Writeback using SQL Server Management Studio (SSMS) or Business intelligence studio (BIDS). It can only be done by writing MDX queries through SSMS. However you can built your own front end application and pass right XMLA script to analysis server.

Let’s understand “how can we implement cell Writeback?”

There are two major steps:
  1. Enable Cell Writeback for measure group/partition
  2. Execute MDX queries for changing cell/tuple values for same measure group/partition
1. Enable Cell Writeback for measure group/partition

Go to cube’ Partition tab, right click on measure group partition and select “Writeback Settings…”.


















It will open new pop up window, where your changes will be recorded. By default, table name will be WriteTable_.  You can change table name and data source if you want to record in some other table or data source.


























Once you click "OK", it will create one extra partition (Writeback Partition) for recording changes.  Once you deploy solution, same SQL Server table will be created in Specified data source.

So now Cell Writeback has been enabled. Now let’s change some data in cube.

2. Execute MDX queries for changing cell/tuple values values for same measure group/partition

MSDN Document provides syntax definition for updating cube data.

In example, we have data from 2001 to 2004 in our cube:
  1. select  [Dim Product Writeback].[Dim Product Writeback].MEMBERS on 1   
  2.       ,[Order Date].[Calendar Year].members on 0   
  3.   from  [Adventure Writeback Cube]   
  4.    where ([Measures].[Sales Amount])  






If business user has to enter data for 2005 then it can be done by writing UPDATE CUBE statement in SSMS:
Update [Adventure Writeback Cube]      
   set ([Order Date].[Hierarchy].[Calendar Year].&[2005]       ,[Measures].[Sales Amount]) = 10,000,000  








One more important aspect, whenever user execute UPDATE statement server internally start new session for user with New BEGIN TRANSACTION. These changes will be visible to same user. Only when user COMMIT TRANSACTION by executing COMMIT Statement, it will be visible to others. User can ROLLBACK transactions using ROLLBACK.

7 comments:

  1. Hi All,

    Please help on the SSIS issue.

    i have a package.It contains Foreach loop container,Inside foreach loop container,I have one Dataflow task(Inside dataflow task,i am using Oledb source(table),I am populating

    Data into Flat file)with flat file name YYYYMMDD_HH24MISS.txt. After i want to Zip that file with same file name.
    YYYYMMDD_HH24MISS.txt.zip,After that i want copy that Zip file into another location.

    Thanks in advance...

    ReplyDelete
  2. I really appreciate for your efforts to make things easy to understand. I was really many students struggling to understand certain concepts but you made it clear and help me bring back my confidence.one of the recommended site

    MSBI Online Training in usa
    MSBI Online Training in india
    MSBI Online Training in hyderabad

    ReplyDelete
  3. Hi,

    Thank you so much for posting this. I really appreciate your work. Keep it up. Great work!.
    MSBI

    ReplyDelete
  4. What a fantastic read on MSBI Tutorial.This has helped me understand a lot in MSBI Tutorial. Please keep sharing similar write ups on MSBI Tutorial. Guys if you are keen to know more on MSBI Tutorial,must check this wonderful MSBI Tutorial and i'm sure you will enjoy learning on MSBI Tutorial.:-https://www.youtube.com/watch?v=V5gXTb4QO-g&t=3s

    ReplyDelete
  5. All are saying the same thing repeatedly, but in your blog I had a chance to get some useful and unique information, I love your writing style very much, I would like to suggest your blog in my dude circle, so keep on updates.
    MSBI Certification

    ReplyDelete