Showing posts with label formula. Show all posts
Showing posts with label formula. Show all posts

Friday, March 23, 2012

Refresh calculation when working on imported as db

Hi,
I created a new solution and imported an AS db to it so I can avoid to work on the database itself.
Now, when I change an MDX formula in a calculation, I cannot see the change effect in the browser without re-processing the cube.

What Am I missing? There sure is a way to see the effect of a calculation change by using some kind of refresh? I tried re-connect and refresh and save, nothing works.

Thanks,
Philippe

The BI project you imported is offline, changes to calculations are only saved to the local .cube file (while the cube browser gets the data from the live server). That's why you need to re-deploy (not necessarily with processing though) on the server. For editing calculations and quickly seeing the effects, it's easier to work in online mode (from Visual Studio, File -> Open -> Analysis Services Database).

Adrian Dumitrascu

|||

Adrian Dumitrascu wrote:

The BI project you imported is offline, changes to calculations are only saved to the local .cube file (while the cube browser gets the data from the live server). That's why you need to re-deploy (not necessarily with processing though) on the server. For editing calculations and quickly seeing the effects, it's easier to work in online mode (from Visual Studio, File -> Open -> Analysis Services Database).

Adrian Dumitrascu

Yes Offline you need to deploy before you see the changes, in online mode you need to SAVE to see the changes.

That requires some tricky organization when working as a team...

Also, tough not to break something working when changing a formula.
Lastly Sourcesafe becomes hard to use like that.
SourceSafe does a poor job anyways with cubes. When you delete an object like cube or dataview you cannot get it back from the history. It shows it in the project exlporer but says object has been deleted and is invalid...

I sure yet have to master VSS however I suspect that there is room for improvement in this working model.

Philippe

Monday, March 12, 2012

Referencing a field in another table as part of a formula in a computed column

Hi guys, I am new to all of this stuff so please bare with me. I will try to explain this as simply as I can. I have 2 tables.. Table1 and Table2 they are linked using both the STOCKCODE and SUPPLIER fields. In Table 1 is the STOCKCODE, LENGTH AND SUPPLIER fields (there are others but these are the 3 that I need to use) In Table2 is STOCKCODE, SUPPLIER and SUPPLER_MASS. What I want to do is put a calculated column into Table2. The formula I need is fairly simple it is: 1/(LENGTH*SUPPLIER_MASS)

Ok so here is what I would like:

1/(SUPPLIER_MASS*(SELECT Table1.LENGTH FROM Table1 WHERE Table1.STOCKCODE=Table2.STOCKCODE AND Table1.SUPPLIER=Table2.SUPPLIER)

From what I understand I can't have a query in a calculated column's "formula" field?

So how would I do this? I don't want to run a query because LENGTH or SUPPLIER_MASS could change on a day to day basis meaning I will have to run the query everything one of these changes. The benefit of having the calculated column is that it will update as soon as LENGTH or SUPPLIER_MASS changes.

Is there any way I can do this?

Thanks guys (and girls)You can have insert, update trigger which will update calculated column every time you update a record or insert a new one.

Thank you.