<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://sqlserver.ro/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Business Intelligence - OLAP</title><link>http://sqlserver.ro/forums/21/ShowForum.aspx</link><description /><dc:language>en</dc:language><generator>CommunityServer 2.1 SP2 (Build: 61129.1)</generator><item><title>Re: Agregare diferita pe diverse dimensiuni</title><link>http://sqlserver.ro/forums/thread/6926.aspx</link><pubDate>Thu, 19 Mar 2009 08:55:07 GMT</pubDate><guid isPermaLink="false">963f3a18-65dd-4aad-905c-b785cfe1d7c7:6926</guid><dc:creator>B_gd_n[ ]Sahlean</dc:creator><slash:comments>0</slash:comments><comments>http://sqlserver.ro/forums/thread/6926.aspx</comments><wfw:commentRss>http://sqlserver.ro/forums/commentrss.aspx?SectionID=21&amp;PostID=6926</wfw:commentRss><description>Cred ca omul vrea ca valorile agregate Client + Produs să fie obţinute prin însumare (funcţia agregată SUM) şi doar TOTALurile de la produse (de exemplu) să fie o medie. Îmi dau şi eu cu presupusul pentru că cerinţele nu sunt suficient de clare.&lt;br&gt;</description></item><item><title>Re: Agregare diferita pe diverse dimensiuni</title><link>http://sqlserver.ro/forums/thread/6925.aspx</link><pubDate>Thu, 19 Mar 2009 08:24:40 GMT</pubDate><guid isPermaLink="false">963f3a18-65dd-4aad-905c-b785cfe1d7c7:6925</guid><dc:creator>katalyn</dc:creator><slash:comments>0</slash:comments><comments>http://sqlserver.ro/forums/thread/6925.aspx</comments><wfw:commentRss>http://sqlserver.ro/forums/commentrss.aspx?SectionID=21&amp;PostID=6925</wfw:commentRss><description>&lt;P&gt;Nu am folosit aşa ceva însă se poate modifica o măsură la proprietatea AggregateFunction (click dreapa pe o măsură) şi în loc de sum (funcţia de agregare default) se poate selecta AverageOfChildren. Însă atenţie pentru că trebuie legată de o dimensiune de tip TIME şi asta pentru că funcţia de agregare amintită are un comportament semiaditiv (&lt;A href="http://msdn.microsoft.com/en-us/library/ms175356.aspx"&gt;http://msdn.microsoft.com/en-us/library/ms175356.aspx&lt;/A&gt;).&lt;/P&gt;
&lt;P&gt;pt mai multe detalii: &lt;A href="http://groups.google.com/group/microsoft.public.sqlserver.olap/msg/c662e201b99678bc?pli=1"&gt;http://groups.google.com/group/microsoft.public.sqlserver.olap/msg/c662e201b99678bc?pli=1&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;(alternativa expusă în link, pentru a nu se folosi o dimensiune de tip time, se pot adăuga&amp;nbsp;măsuri de tip COUNT şi SUM şi una care să facă SUM()/COUNT()).&lt;/P&gt;</description></item><item><title>Re: Agregare diferita pe diverse dimensiuni</title><link>http://sqlserver.ro/forums/thread/6922.aspx</link><pubDate>Thu, 19 Mar 2009 07:23:23 GMT</pubDate><guid isPermaLink="false">963f3a18-65dd-4aad-905c-b785cfe1d7c7:6922</guid><dc:creator>B_gd_n[ ]Sahlean</dc:creator><slash:comments>0</slash:comments><comments>http://sqlserver.ro/forums/thread/6922.aspx</comments><wfw:commentRss>http://sqlserver.ro/forums/commentrss.aspx?SectionID=21&amp;PostID=6922</wfw:commentRss><description>&lt;BLOCKQUOTE&gt;&lt;div&gt;&lt;img src="http://sqlserver.ro/Themes/default/images/icon-quote.gif"&gt; &lt;strong&gt;Serj K:&lt;/strong&gt;&lt;/div&gt;&lt;div&gt;&lt;br&gt;Am cautat fara succes in tot felul de surse, dar nu am gasit cum pot face ca o anumita valoare sa se agrege diferit pe unele dimensiuni. &lt;br&gt;&lt;br&gt;Exemplu concret: &lt;br&gt;-avem un tabel cu structura&lt;br&gt;&lt;br&gt;Pe linii - Produs (dimensiune)&lt;br&gt;Pe coloane - Client (dimensiune)&lt;br&gt;Masura - Valoare&lt;br&gt;&lt;br&gt;Structura care ar trebui sa o obtin din cub:&lt;br&gt;&lt;br&gt;Produs&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Ceapa&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Cartofi&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Mere&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; TOTAL&lt;br&gt;&lt;br&gt;Clienti&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br&gt;Marius&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 10&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 20&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 30&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 60&lt;br&gt;Gogu &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 20 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 10 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; 0 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; 30 &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br&gt;Gigel&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 5 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; 7 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; 6 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; 6 &amp;nbsp; &lt;br&gt;TOTAL&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 11,66&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 12,3 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; 12 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 32&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br&gt;&lt;br&gt;Deci pe linie - agregarea e suma, dar pe coloane - agregarea e medie. &lt;br&gt;&lt;/div&gt;&lt;/BLOCKQUOTE&gt;&lt;br&gt;Nu cred ca poti rezolva problema doar in MDX sau/şi din server-ul Analysis Services.&lt;br&gt;Soluţia ar fi să apelezi interogarea MDX din T-SQL sau rezultatele generate din interogarea MDX să le duci într-un generator de rapoarte ...&lt;br&gt;&lt;br&gt;În cazul tău, poţi încerca să adaptezi această soluţie care pentru mine a funcţionat:&lt;br&gt;&lt;span style="color:Black;background-color:transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;sp_configure &lt;span style="color:Red;background-color:transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;'show advanced options'&lt;/span&gt; , 1&lt;br&gt;&lt;span style="color:Blue;background-color:transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;RECONFIGURE&lt;/span&gt;&lt;br&gt;GO&lt;br&gt;sp_configure &lt;span style="color:Red;background-color:transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;'ad hoc distributed queries'&lt;/span&gt; , 1&lt;br&gt;&lt;span style="color:Blue;background-color:transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;RECONFIGURE&lt;/span&gt;&lt;br&gt;GO&lt;br&gt;&lt;br&gt;&lt;i&gt;&lt;span style="color:Blue;background-color:transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;SELECT&lt;/span&gt; 1 &lt;span style="color:Blue;background-color:transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;AS&lt;/span&gt; Aux, &lt;span style="color:Fuchsia;background-color:transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;CAST&lt;/span&gt;("[Produs].[Produs].[Grupa].[MEMBER_CAPTION]" &lt;span style="color:Blue;background-color:transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;AS&lt;/span&gt; &lt;span style="color:Blue;background-color:transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;VARCHAR&lt;/span&gt;(255)) &lt;span style="color:Blue;background-color:transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;AS&lt;/span&gt; Produs,&lt;br&gt;&lt;span style="color:Fuchsia;background-color:transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;CAST&lt;/span&gt;(&lt;span style="color:Fuchsia;background-color:transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;ISNULL&lt;/span&gt;("[Timp].[Calendar].[An].&amp;amp;[2005]",0) &lt;span style="color:Blue;background-color:transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;AS&lt;/span&gt; &lt;span style="color:Blue;background-color:transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;MONEY&lt;/span&gt;) &lt;span style="color:Blue;background-color:transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;AS&lt;/span&gt; Vanzari2005,&lt;br&gt;&lt;span style="color:Fuchsia;background-color:transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;CAST&lt;/span&gt;(&lt;span style="color:Fuchsia;background-color:transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;ISNULL&lt;/span&gt;("[Timp].[Calendar].[An].&amp;amp;[2006]",0) &lt;span style="color:Blue;background-color:transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;AS&lt;/span&gt; &lt;span style="color:Blue;background-color:transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;MONEY&lt;/span&gt;) &lt;span style="color:Blue;background-color:transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;AS&lt;/span&gt; Vanzari2006,&lt;br&gt;&lt;span style="color:Fuchsia;background-color:transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;CAST&lt;/span&gt;(&lt;span style="color:Fuchsia;background-color:transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;ISNULL&lt;/span&gt;("[Timp].[Calendar].[An].&amp;amp;[2007]",0) &lt;span style="color:Blue;background-color:transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;AS&lt;/span&gt; &lt;span style="color:Blue;background-color:transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;MONEY&lt;/span&gt;) &lt;span style="color:Blue;background-color:transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;AS&lt;/span&gt; Vanzari2007 &lt;br&gt;&lt;span style="color:Blue;background-color:transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;FROM&lt;/span&gt; &lt;span style="color:Blue;background-color:transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;OPENROWSET&lt;/span&gt;&lt;br&gt;(&lt;span style="color:Red;background-color:transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;'MSOLAP'&lt;/span&gt;,&lt;br&gt;&lt;span style="color:Red;background-color:transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;'DATASOURCE=localhost;Initial Catalog=BazaDeDateAS;'&lt;/span&gt;,&lt;br&gt;&lt;span style="color:Red;background-color:transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;'SELECT {[Produs].[Produs].[Grupa]} ON ROWS,{[Timp].[Calendar].[An]} ON COLUMNS FROM CubVanzari WHERE Valoare'&lt;/span&gt;) &lt;span style="color:Blue;background-color:transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;AS&lt;/span&gt; Cub&lt;/i&gt;      &lt;br&gt;&lt;u&gt;&lt;b&gt;&lt;span style="color:Blue;background-color:transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;UNION&lt;/span&gt; &lt;span style="color:Silver;background-color:transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;ALL&lt;/span&gt;&lt;/b&gt;&lt;/u&gt;&lt;br&gt;&lt;i&gt;&lt;span style="color:Blue;background-color:transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;SELECT&lt;/span&gt; 2 &lt;span style="color:Blue;background-color:transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;AS&lt;/span&gt; Aux, &lt;span style="color:Red;background-color:transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;'Total'&lt;/span&gt; &lt;span style="color:Blue;background-color:transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;AS&lt;/span&gt; Total, &lt;span style="color:Fuchsia;background-color:transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;AVG&lt;/span&gt;(Vanzari2005) &lt;span style="color:Blue;background-color:transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;AS&lt;/span&gt; Medie2005, &lt;span style="color:Fuchsia;background-color:transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;AVG&lt;/span&gt;(Vanzari2006) &lt;span style="color:Blue;background-color:transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;AS&lt;/span&gt; Medie2006, &lt;span style="color:Fuchsia;background-color:transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;AVG&lt;/span&gt;(Vanzari2007) &lt;span style="color:Blue;background-color:transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;AS&lt;/span&gt;&lt;br&gt;&lt;span style="color:Blue;background-color:transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;FROM&lt;/span&gt;&lt;br&gt;(&lt;br&gt;&lt;span style="color:Blue;background-color:transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;SELECT&lt;/span&gt; &lt;span style="color:Fuchsia;background-color:transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;CAST&lt;/span&gt;("[Produs].[Produs].[Grupa].[MEMBER_CAPTION]" &lt;span style="color:Blue;background-color:transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;AS&lt;/span&gt; &lt;span style="color:Blue;background-color:transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;VARCHAR&lt;/span&gt;(255)) &lt;span style="color:Blue;background-color:transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;AS&lt;/span&gt; Produs,&lt;br&gt;&lt;span style="color:Fuchsia;background-color:transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;CAST&lt;/span&gt;(&lt;span style="color:Fuchsia;background-color:transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;ISNULL&lt;/span&gt;("[Timp].[Calendar].[An].&amp;amp;[2005]",0) &lt;span style="color:Blue;background-color:transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;AS&lt;/span&gt; &lt;span style="color:Blue;background-color:transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;MONEY&lt;/span&gt;) &lt;span style="color:Blue;background-color:transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;AS&lt;/span&gt; Vanzari2005,&lt;br&gt;&lt;span style="color:Fuchsia;background-color:transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;CAST&lt;/span&gt;(&lt;span style="color:Fuchsia;background-color:transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;ISNULL&lt;/span&gt;("[Timp].[Calendar].[An].&amp;amp;[2006]",0) &lt;span style="color:Blue;background-color:transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;AS&lt;/span&gt; &lt;span style="color:Blue;background-color:transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;MONEY&lt;/span&gt;) &lt;span style="color:Blue;background-color:transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;AS&lt;/span&gt; Vanzari2006,&lt;br&gt;&lt;span style="color:Fuchsia;background-color:transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;CAST&lt;/span&gt;(&lt;span style="color:Fuchsia;background-color:transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;ISNULL&lt;/span&gt;("[Timp].[Calendar].[An].&amp;amp;[2007]",0) &lt;span style="color:Blue;background-color:transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;AS&lt;/span&gt; &lt;span style="color:Blue;background-color:transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;MONEY&lt;/span&gt;) &lt;span style="color:Blue;background-color:transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;AS&lt;/span&gt; Vanzari2007 &lt;br&gt;&lt;span style="color:Blue;background-color:transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;FROM&lt;/span&gt; &lt;span style="color:Blue;background-color:transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;OPENROWSET&lt;/span&gt;&lt;br&gt;(&lt;span style="color:Red;background-color:transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;'MSOLAP'&lt;/span&gt;,&lt;br&gt;&lt;span style="color:Red;background-color:transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;'DATASOURCE=localhost;Initial Catalog=BazaDeDateAS;'&lt;/span&gt;,&lt;br&gt;&lt;span style="color:Red;background-color:transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;'SELECT {[Produs].[Produs].[Grupa]} ON ROWS,{[Timp].[Calendar].[An]} ON COLUMNS FROM CubVanzari WHERE Valoare'&lt;/span&gt;) &lt;span style="color:Blue;background-color:transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;AS&lt;/span&gt; Cub&lt;br&gt;) &lt;span style="color:Blue;background-color:transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;AS&lt;/span&gt; TsqlQuery&lt;/i&gt; Medie2007      &lt;br&gt;&lt;u&gt;&lt;span style="color:Blue;background-color:transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;ORDER&lt;/span&gt; &lt;span style="color:Blue;background-color:transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;BY&lt;/span&gt; Aux&lt;/u&gt;&lt;br&gt;&lt;br&gt;&lt;span style="color:Blue;background-color:transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;EXEC&lt;/span&gt; sp_configure &lt;span style="color:Red;background-color:transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;'ad hoc distributed queries'&lt;/span&gt; , 0&lt;br&gt;&lt;span style="color:Blue;background-color:transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;RECONFIGURE&lt;/span&gt;&lt;br&gt;GO&lt;br&gt;&lt;br&gt;sp_configure &lt;span style="color:Red;background-color:transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;'show advanced options'&lt;/span&gt; , 0&lt;br&gt;&lt;span style="color:Blue;background-color:transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;RECONFIGURE&lt;/span&gt;&lt;br&gt;GO&lt;/span&gt;&lt;br&gt;</description></item><item><title>Re: Agregare diferita pe diverse dimensiuni</title><link>http://sqlserver.ro/forums/thread/6918.aspx</link><pubDate>Wed, 18 Mar 2009 14:43:26 GMT</pubDate><guid isPermaLink="false">963f3a18-65dd-4aad-905c-b785cfe1d7c7:6918</guid><dc:creator>katalyn</dc:creator><slash:comments>0</slash:comments><comments>http://sqlserver.ro/forums/thread/6918.aspx</comments><wfw:commentRss>http://sqlserver.ro/forums/commentrss.aspx?SectionID=21&amp;PostID=6918</wfw:commentRss><description>&lt;P&gt;Când se ajunge la crearea măsurilor se poate adăuga o măsură calculată bazată pe funcţia de agrgare AVERAGE OVER TIME.&amp;nbsp; La tabela de fapte se adauga NEW NAMED CALCULATION unde la Expression se scrie formula care se calculează iar aceasta poate fi: [Ceapa]+[Cartofi]+[Mere].&lt;/P&gt;
&lt;P&gt;Înainte de toate acestea ar fi bine să se răspundă la întrebarea adresată de Remus.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description></item><item><title>Re: Agregare diferita pe diverse dimensiuni</title><link>http://sqlserver.ro/forums/thread/6917.aspx</link><pubDate>Wed, 18 Mar 2009 14:26:35 GMT</pubDate><guid isPermaLink="false">963f3a18-65dd-4aad-905c-b785cfe1d7c7:6917</guid><dc:creator>StefanTanasa</dc:creator><slash:comments>0</slash:comments><comments>http://sqlserver.ro/forums/thread/6917.aspx</comments><wfw:commentRss>http://sqlserver.ro/forums/commentrss.aspx?SectionID=21&amp;PostID=6917</wfw:commentRss><description>O solutie ar fi utilizarea membrilor calculati, iar acolo scrii un MDX care sa tina cont daca e un total (o suma agregata) pe dimensiune. &lt;br&gt;</description></item><item><title>Re: Agregare diferita pe diverse dimensiuni</title><link>http://sqlserver.ro/forums/thread/6382.aspx</link><pubDate>Thu, 11 Dec 2008 12:25:58 GMT</pubDate><guid isPermaLink="false">963f3a18-65dd-4aad-905c-b785cfe1d7c7:6382</guid><dc:creator>rremus</dc:creator><slash:comments>0</slash:comments><comments>http://sqlserver.ro/forums/thread/6382.aspx</comments><wfw:commentRss>http://sqlserver.ro/forums/commentrss.aspx?SectionID=21&amp;PostID=6382</wfw:commentRss><description>Deci inteleg ca tu vinzi produsele 'Marius', 'Gogu' si 'Gigel' unor clienti numiti 'Ceapa' si 'Cartofi' ? &lt;br&gt;Posteaza te rog structura tabelelor, DDL-ul cu care le creezi si DML-ul cu care le populezi.&lt;br&gt;</description></item><item><title>Agregare diferita pe diverse dimensiuni</title><link>http://sqlserver.ro/forums/thread/6359.aspx</link><pubDate>Wed, 10 Dec 2008 09:43:00 GMT</pubDate><guid isPermaLink="false">963f3a18-65dd-4aad-905c-b785cfe1d7c7:6359</guid><dc:creator>Serj K</dc:creator><slash:comments>0</slash:comments><comments>http://sqlserver.ro/forums/thread/6359.aspx</comments><wfw:commentRss>http://sqlserver.ro/forums/commentrss.aspx?SectionID=21&amp;PostID=6359</wfw:commentRss><description>&lt;br&gt;Am cautat fara succes in tot felul de surse, dar nu am gasit cum pot face ca o anumita valoare sa se agrege diferit pe unele dimensiuni. &lt;br&gt;&lt;br&gt;Exemplu concret: &lt;br&gt;-avem un tabel cu structura&lt;br&gt;&lt;br&gt;Pe linii - Produs (dimensiune)&lt;br&gt;Pe coloane - Client (dimensiune)&lt;br&gt;Masura - Valoare&lt;br&gt;&lt;br&gt;Structura care ar trebui sa o obtin din cub:&lt;br&gt;&lt;br&gt;Produs&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Ceapa&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Cartofi&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Mere&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; TOTAL&lt;br&gt;&lt;br&gt;Clienti&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br&gt;Marius&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 10&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 20&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 30&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 60&lt;br&gt;Gogu &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 20 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 10 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; 0 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; 30 &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br&gt;Gigel&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 5 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; 7 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; 6 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; 6 &amp;nbsp; &lt;br&gt;TOTAL&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 11,66&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 12,3 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; 12 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 32&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br&gt;&lt;br&gt;Deci pe linie - agregarea e suma, dar pe coloane - agregarea e medie. &lt;br&gt;</description></item></channel></rss>