A SQL Server technology that supports the creation, management, and delivery of both traditional, paper-oriented reports and interactive, web-based reports.
DISCLAIMER : THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
Title: Calculated Measure in Linked Measure group is not automatically refreshed after cube writbeck
Source link: https://learn.microsoft.com/en-us/answers/questions/153920/calculated-measure-in-linked-measure-group-is-not.html
Scenario :
We have 1 OLAP cube called C1, in C1 we have one measure [Sales1] , one calculated measure called [TwoTimesSales1] (Which equals to 2*[Sales1]), for this measure group we enabled writeback;
A second cube called C2, in C2 we have one measure [Sales2];
Last, we have a third cube called C3. In C3, we have linked measure group [Sales1] [Sales2] [TwoTimesSales1]. And we have a calculated measure [Last] = [Sales1] + [Sales2 ]
Procedure and Results :
Now, when user query C1 [Sales1], the result;
the user could publish writeback to the query. For example, changing 2019 sales1 “100” to “111”. After publishing, we could see the calculated measure in C1 get the updated value immediately.
But in the Cube 3, when we click refresh data in PowerPivot. We get :
Only the linked measure [Sales1] changed its value. The calculated measure [Last] in C3, would not change accordingly and kept the old sum as a wrong total here.
Also the linked – calculated measure [TwoTimesSales1] , has not changed its value either.
Workaround :
We could work around this by either clearing the cache using query:
<ClearCache xmlns="http://schemas.microsoft.com/analysisservices/2003/engine">;
<Object>
<DatabaseID>DEMO</DatabaseID>
</Object>
</ClearCache>
Or processing the cube 3 after the writeback operation is published.
Either way we could get the correct value in c3 afterwards:
We could also schedule task to do these operation using SQL Server Agent in a quarter or an hour , so the users could get correct answer after a while.
Conclusion :
It seems this is a hidden limitation of using Linked Measure with Calculated Measure. When we have writeback enabled partition, either to calculate measure first in the source cube then to use it in linked measure group, or getting linked measure value first and then calculate it in the end cube, are bad approaches that would have wrong results. The calculated measure in end cube is processed and stored in its cache. Changing storage mode ROLAP/MOLAP could not help on this. Enable proactive caching and set the interval to a small value could solve the problem, but would involve risks that can crash the SSAS server.
Generally speaking , although this is not in the list of Usage limitation of linked measure group, we would recommend user to avoid using linked calculated measure and writeback together. If we have to come to this scene , using a cube to have all the measures and calculation in it, then enable writeback is a better choice.



