I tested it yesterday and it works. Here are the steps I did to test it. If anyone wants to shoot holes, I am not against it, I am happy for you to tell me what I'm missing.
I took a copy of sample basic and exported the level 0 data. Typically one would just use the calcdata.txt file to load, but that loads all levels so everything would be an input value. I then cleared the database, reloaded the level 0 extract and ran the default calc. As you can see the result is as expected. I have data for all of the intersections
Next I went into the outline and removed the children of Colas (100)
I saved the outline retaining all data. I then refreshed the data in my spreadsheet.
As you can see, I have phantom data in Colas and the retrieval no longer recognizes its children.
I created the following calc script. Notice I fixed on level 0 members of my sparse dimensions. This way the script would run quickly and only impact the those members that are newly designated level 0 members (by removing their children). I did the agg at the end so it would propagate the "Fix" up to the ancestors.
SET UPDATECALC OFF;
SET AGGMISSG ON;
FIX(@relative("Product",0),@relative("Market",0))
CLEARBLOCK NONINPUT ;
ENDFIX
agg("Product","Market");
I ran the script and verified the results
IT WORKED !!!! Colas data was removed but not any other. I shared the results with "Fred" and mentioned that were I doing this, I would add this calc right after my dimension build to clear out the members before a user had a chance to submit data there.
There you have it, a problem I have been struggling with for years, easily solved but a simple question. Thanks "Fred". Others may have stumbled upon this before, but I've never seen anyone post it.
No comments:
Post a Comment