Kimball Forum
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Query VS Expressions

3 posters

Go down

Query VS Expressions Empty Query VS Expressions

Post  manickam Wed Apr 23, 2014 8:49 am

In general which is the best place to handle the calculatations like percentage etc...either in the database query level or in the reporting side (expressions)

People say its better to handle in database, since reporting service will take more time to render the report.

Please share your inputs for the above scenario.


Posts : 27
Join date : 2013-04-26

Back to top Go down

Query VS Expressions Empty Re: Query VS Expressions

Post  TheNJDevil Wed Apr 23, 2014 8:54 am

The rule I've been following is that if the calculation is something that a report writer will likely get wrong (and by report writer I have to include self-service BI potential), it's handled before it gets to the BI/reporting layer.


Posts : 68
Join date : 2011-03-01

Back to top Go down

Query VS Expressions Empty Re: Query VS Expressions

Post  nick_white Fri May 02, 2014 7:39 am

My suggestions:
1. If it can be pre-calculated then do it it your ETL and store the result in the DB (e.g. calculate unit cost knowing total cost and number of units)
2. If it's not something that can be pre-calculated then, assuming you can define it in both places, it makes little difference if you define it in the DB (using a view, calculated column, etc.) or in your reporting tool metadata - as the reporting tool will/should be converting it to SQL anyway. However I would suggest you do it consistently in one place or the other.
However, apart from trivial calculations, it should never be left to the report writer to define it; any calculated field should be defined in the reporting tool so that end-users can drag it onto their reports. This ensures that an attribute is defined consistently and correctly - you really want to avoid one report writer defining 'profitability' one way and another report writer using a different definition.


Posts : 364
Join date : 2014-01-06
Location : London

Back to top Go down

Query VS Expressions Empty Re: Query VS Expressions

Post  Sponsored content

Sponsored content

Back to top Go down

Back to top

- Similar topics

Permissions in this forum:
You cannot reply to topics in this forum