Query VS Expressions

View previous topic View next topic Go down

Query VS Expressions

Post  manickam on 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.

manickam

Posts : 27
Join date : 2013-04-26

View user profile

Back to top Go down

Re: Query VS Expressions

Post  TheNJDevil on 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.

TheNJDevil

Posts : 68
Join date : 2011-03-01

View user profile

Back to top Go down

Re: Query VS Expressions

Post  nick_white on 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.

nick_white

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

View user profile

Back to top Go down

Re: Query VS Expressions

Post  Sponsored content


Sponsored content


Back to top Go down

View previous topic View next topic Back to top

- Similar topics

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