Archive for August, 2011

Microsoft Analytics für Twitter

David Claßen

Mit "Analytics for Twitter" stellt Microsoft ein kostenloses PowerPivot AddIn zur Verfügung, mit dem Abfragen aus einem Excel 2010 Dashboard heraus gegen die Online-Blogging-Plattform Twitter gestellt werden können. Anschließend lassen sich die mit PowerPivot gespeicherten Daten über ein Excel-Dashboard analysieren.
Diese zur Verfügung gestellte “Demo” eignet sich für die

  • die Twitter immer schon mal analysieren wollten
  • die PowerPivot anhand von Echtdaten kennenlernen wollen
  • die es spannend finden, Excel als Dashboard zu verwenden

Dashboard

(continue reading…)

  • Share/Bookmark

Microsoft setzt mit dem Projekt Barcelona auf Metadatenmanagement

Thomas Strehlow

Nach der Durchsicht der Denali CTP3 Version war der Depency Service aus der CTP2 nicht mehr zu finden. Die Dokumentation verweist zwar noch darauf, aber sämtliche Funktionen im Management Studio waren abgeschaltet.

Nach Auskunft durch den Projektleiter des Projektes Barcelona hat Microsoft den Dependency Service aus Denali herausgenommen und stattdessen bereits im April das Projekt Barcelona initiiert. Dabei handelt es sich um ein umfassendes Metadaten Management System, das Daten aus folgenden Quellen integriert:

  • SQL Server Datenbank
  • Integration Services
  • Reporting Services
  • Sharepoint
  • Excel

Offensichtlich wird es auch die Möglichkeit geben weiter Datenquellen anzubinden. Die Gesamtarchitektur wird wie folgt vorgestellt:

image

Was ist denn überhaupt Metadaten Management? Metadaten werden nach Kimball als „all data about data“ beschrieben. Nicht selten wird Metadaten Management mit Masterdaten Management verwechselt. Der Begriff ist gerade in der BI sehr umfassend. Die nachfolgende Tabelle umschreibt die Bereiche in denen innerhalb einer BI und DWH Umgebung Metadaten Management eine Rolle einnimmt:

 

Fachlich

Technisch

Operativ

Frontend / BI

Kennzahlendefinitionen, Umbenennungen, KPI, Kommentare

Berechnete Kennzahlen, Berichtslayout, Filtereinstellungen

Aktualität, Systemzugriffe (Nutzung), Änderungshistorie

Backend / DWH

Konzeptionelles Datenmodell, Hierarchien, Dimensionen, Fakten

Datenmodell und Dokumentation

Physisches Datenmodell, Tabellennamen, Nutzungsstatistiken

Datenintegration / Datenqualität

Umbenennungen, fachl. Prozessbeschreibungen, Quellsysteme, Referenzdaten

Datenflusslogik, Transformationen, DQ Regeln, Quellsysteme

Durchlaufzeiten, Hardwareauslastung, Verarbeitungsstand, Quellsysteme

 

Microsoft wird mit dem Projekt Barcelona sicher nicht den gesamten Bereich abdecken. Hier wird der Schwerpunkt auf der automatischen Dokumentation von Referenzen und Datenflüssen liegen.

Es steht bereits jetzt eine erste GUI zum Test zur Verfügung. Diese ist als „moderne“ Cloud Anwendung umgesetzt: http://projectbarcelona.cloudapp.net

Grundsätzlich schließt Microsoft mit Barcelona eine wichtige Lücke in der gesamten BI Strategie. Durch die Integration der wichtigsten BI Produkte ist das Vorgehen vielversprechend. In wenigen Monaten soll die Roadmap veröffentlicht werden. Dann wird auch klarer wann und in welcher Form Microsoft diese Lösung anbieten wird.

  • Share/Bookmark

Document Sets in SharePoint 2010

Sandra Erb

 

Während in SharePoint 2007 Dokumente lediglich über Ordner strukturiert werden konnten, bietet SharePoint 2010 ein neues Feature, mit welchem Dokumente und zugehörige Metadaten einfach strukturiert und verwaltet werden können – das Document Set.

Das Document Set bietet die folgenden neuen Kernfunktionen:

  • Definition der in einem Document Set erlauben Content Types
  • Definition von Dateien, welche in jedem Dokument Set vorhanden sein sollen
  • Alle Dokumente innerhalb eines Document Sets teilen die selben Metadaten
  • Eine Welcome Page, welche eine Zusammenfassung der wichtigsten Metadaten liefert
  • Das gesamte Set kann versioniert werden
  • Einfache Verwaltung über die SharePoint Oberfläche
  • Document Sets basieren auf den SharePoint Content Types, es können also beliebig viele Document Set Content Types mit verschiedenen Inhalten vordefiniert werden


Hinweis
: Document Sets sind ein Feature des SharePoint Servers 2010, sie sind also nicht in den SharePoint Foundations vorhanden.

Document Sets bieten sich immer dann an, wenn es ein oder mehr Standarddokumente gibt, die in verschiedenen Bereichen benötigt werden, oder wenn verschiedene Dokumente dieselben Eigenschaften teilen müssen.

Die einzelnen Features im Detail

Definition von erlaubten Content Types

Man kann selbst bestimmen, welche Content Types innerhalb eines Document Sets erlaubt sind, unabhängig von den erlaubten Content Types der übergeordneten Document Library.

image

Standarddokumente

Dokumente, welche als Default Content, zu einem Document Set hinzugefügt werden, werden automatisch in jedem neuen Document Set erstellt. Zusätzlich kann definiert werden, ob jede Datei automatisch den Namen des Document Sets als Präfix erhalten soll.

image

Geteilte Metadaten

Die Inhalte, der unter Shared Columns ausgewählten Spalten, werden auf alle Dokumente innerhalb des Document Sets synchronisiert.

image

Welcome Page

Die Welcome Page zeigt zum einen eine Zusammenfassung der wichtigsten Metadaten (Welcome Page Columns) und kann zum anderen einen eigenen View zur Verfügung stellen, mit dem die Dokumente innerhalb des Document Sets angezeigt werden sollen (Welcome Page View). Dies ermöglicht es innerhalb des Dokument Sets andere Spalten anzuzeigen, als auf Bibliotheksebene.

Man kann die Standard Welcome Page verwenden, oder diese an die eigenen Bedürfnisse anpassen. Hierzu stehen dieselben Möglichkeiten zur Verfügung, wie bei der Bearbeitung einer normalen SharePoint Seite.

image

Versionierung

Das Document Set bietet die Möglichkeit unabhängig von den einzelnen Dokumentenversionen eine Gesamtversion des Document Sets zu erstellen. So ist es möglich, erst verschiedene Versionen der in dem Document Set enthaltenen Dokumente zu erstellen, bevor eine gemeinsame Document Set Version erstellt wird.

Die einzelnen Dokumente werden wie gewohnt anhand der Versionierungseinstellungen der Bibliothek versioniert und verfügen alle über eine eigene Versionshistorie.

Um nun eine Version des gesamten Document Sets zu erstellen, gibt es innerhalb des Document Sets die Schaltfläche “Capture Version” in der Ribbonleiste.

image

Die Versionierung des Document Sets erlaubt es uns selbst, zu entscheiden, welche Versionen der einzelnen Dokumente in die Version des Document Sets gehören. So können z.B. nur die letzten Hauptversionen aller Dokumente beachtet werden.

Zusätzlich kann ein Versionskommentar gesetzt werden.

image 

Die Versionshistorie des Document Sets zeigt sowohl die Versionen des Document Set selbst, als auch die Versionen der einzelnen Dokumente an.

image

Workflows

Genau wie auf einzelnen Dokumenten können auch auf Document Sets Workflows gestartet werden. Dies ermöglicht z.B. einen globalen Genehmigungsprozess für alle Dokumente innerhalb des Document Sets. Zusätzlich können natürlich auch für alle Dokumente innerhalb des Document Sets einzelne Workflows gestartet werden.

Der Document Set Content Type

Das Document Set ist ein normaler SharePoint Content Type. So kann das Document Set z.B. global über die Site Content Types angepasst werden, oder für jede einzelne Bibliothek, in welcher es verwendet wird. Zusätzlich können neue Content Types basierend auf dem Document Set erzeugt werden.

Verwendung von Document Sets

Der Document Set Content Type ist im SharePoint standardmäßig nicht verfügbar. Dieser muss erst mit dem “Document Sets Feature” auf Site Collection Ebene aktiviert werden.

Um Document Sets verwenden zu können, müssen die folgenden Schritte ausgeführt werden:

  1. Unter Site Collection Features muss das Document Set Feature aktiviert werden

    image

    Damit ist der Document Set Content Type verfügbar

  2. In der Bibliothek, in welcher das Document Set verwendet werden soll, muss dieses als Content Type hinzugefügt werden. Hierzu unter Library Settings –> Advanced Settings den Punkt “Allow management of content types” aktivieren.

    image

    In den Einstellungen für die Bibliothek erscheint nun ein neuer Bereich – “Content Types”

  3. Unter Einstellungen einen existierenden Content Type hinzufügen und den Document Set Content Type auswählen

    image

    Das Document Set kann ab jetzt in der Bibliothek verwendet werden

    image

  4. Alle oben genannten Einstellungen für das Document Set können über die Eigenschaften des Content Types unter “Document Set Settings” vorgenommen werden.
  • Share/Bookmark

SharePoint 2010 offline Installation

Daniel Snellen

Ein Horror für jeden Admin der seinen Server liebt, da kommt ein externer Consultant und soll einen SharePoint 2010 installieren, wenn das für den Admin nicht schon schlimm genug ist, benötigt dieser auch noch vom Server aus Zugriff aufs Internet um die Installation durchzuführen.

Für die Consultants untern den Leser sei gesagt, das in vielen Firmen das Servernetzwerk keinen Zugriff auf das Internet haben darf.

Jetzt kann der gut vorbereitet Consultant glänzen, in dem er eine DVD oder einen USB Stick aus der Tasche zieht, auf der die benötigten Dateien und das Installationsscript zu finden sind.

Benötigte Dateien

Als erstes sollten die in der folgenden Tabelle aufgelisteten Dateien bei Microsoft heruntergeladen werden.

Paket Download
Microsoft Sync Framework Runtime v1.0 (x64) http://go.microsoft.com/fwlink/?LinkID=141237&clcid=0×409
Microsoft Chart Controls for the Microsoft .NET Framework 3.5 http://go.microsoft.com/fwlink/?LinkID=141512
Microsoft .NET Framework 3.5 Service Pack 1 http://go.microsoft.com/fwlink/?LinkId=131037
Windows PowerShell 2.0 http://download.microsoft.com/download/2/8/6/28686477-3242-4E96-9009-30B16BED89AF/Windows6.0-KB968930-x64.msu
Windows Identity Framework (Win2008 R2) http://go.microsoft.com/fwlink/?LinkID=166363
WCF fix for Win2008 SP2 http://go.microsoft.com/fwlink/?linkID=160770
Windows Identity Framework (Win2008 SP2) http://go.microsoft.com/fwlink/?LinkID=160381
SQL Server 2008 Native Client http://go.microsoft.com/fwlink/?LinkId=123718&clcid=0×409
Microsoft SQL Server 2008 Analysis Services ADOMD.NET http://go.microsoft.com/fwlink/?LinkID=160390&clcid=0×409
ADO.NET Data Services v1.5 CTP2 (Win2008 SP2) http://go.microsoft.com/fwlink/?LinkId=158354
IIS management cmdlets http://go.microsoft.com/?linkid=9655704
SQL 2008 R2 Reporting Services SharePoint 2010 Add-in http://go.microsoft.com/fwlink/?LinkID=166379
Microsoft Server Speech Platform Runtime http://go.microsoft.com/fwlink/?LinkID=166378
Microsoft Server Speech Recognition Language – TELE(en-US) http://go.microsoft.com/fwlink/?LinkID=166371

Die angegebenen Links sind ohne Gewähr, als dieser Blog erstellt wurde, waren sie noch aktuell.

Ich habe mir für die SharePoint 2010 Installation einen Ordner angelegt, in dem ich auch die Installationsdateien von der SharePoint CD abgelegt hab.
C:\SP2010
Wenn die gesamte CD in dieses Verzeichnis kopiert wurde, dann existiert dort auch schon ein Verzeichnis Namens PrerequisiteInstallerFiles.
image

In diesem Verzeichnis lege ich nun die heruntergeladenen Dateien ab.

image
Das FilterPack wird von Microsoft direkt mit geliefert und muss nicht noch zusätzlich installiert werden.

Installationsscript

Wenn man den normalen Weg der SharePoint 2010 Installation geht, starte man hier und installiert die Prerequisite.
image
Bei dieser Variante wird jedoch ein Internetzugriff benötigt.

Man kann die PrerequisiteInstaller.exe aber auch mit Parametern starten und somit dazu bringen die bereits heruntergeladenen Dateien zu verwenden.

Die PrerequisiteInstaller.exe befindet sich im Root Verzeichnis der SharePoint Installationscd.

Bei meiner Verzeichnisstruktur sieht der Aufruf der PrerequisiteInstaller.exe wie folgt aus:

C:\SP2010\PrerequisiteInstaller.exe /SQLNCli:"c:\sp2010\PrerequisiteInstallerFiles\sqlncli.msi" /ChartControl:"c:\sp2010\PrerequisiteInstallerFiles\MSChart.exe" /NETFX35SP1:"c:\sp2010\PrerequisiteInstallerFiles\dotnetfx35.exe" /PowerShell:"c:\sp2010\PrerequisiteInstallerFiles\Windows6.0-KB968930-x64.msu" /KB976394:"c:\sp2010\PrerequisiteInstallerFiles\Windows6.0-KB976394-x64.msu" /KB976462:"c:\sp2010\PrerequisiteInstallerFiles\Windows6.1-KB976462-v2-x64.msu" /IDFX:"c:\sp2010\PrerequisiteInstallerFiles\Windows6.0-KB974405-x64.msu" /Sync:"c:\sp2010\PrerequisiteInstallerFiles\Synchronization.msi" /FilterPack:"c:\sp2010\PrerequisiteInstallerFiles\FilterPack\FilterPack.msi" /ADOMD:"c:\sp2010\PrerequisiteInstallerFiles\SQLSERVER2008_ASADOMD10.msi" /ReportingServices:"c:\sp2010\PrerequisiteInstallerFiles\rsSharePoint.msi" /Speech:"c:\sp2010\PrerequisiteInstallerFiles\SpeechPlatformRuntime.msi" /SpeechLPK:"c:\sp2010\PrerequisiteInstallerFiles\MSSpeech_SR_en-US_TELE.msi"

Auch wenn es jetzt hier so dargestellt wird, sind in diesem Befehl keine Zeilenumbrüche enthalten.
Zwischen den einzelnen Parametern ist immer ein Leerzeichen innerhalb des Parameters dann nicht mehr.

In meinem Beispiel liegen die Dateien auf der lokalen Festplatte, diese könnten aber auch im Netzwerk abgelegt werden. Dann würden die Parameter z.B. so aus sehen:
/SQLNCLi:”\\SERVER\Freigabe\sqlncli.msi

Es gibt noch einen weiteren Parameter der gesetzt werden kann,  /unattended ,durch diesen wird die Installation ohne Benutzer eingriff durchgeführt.

Wenn alle notwendigen Dateien installiert wurden, kann mit der Installation des SharePoint2010 begonnen werden.

Bei der Installation des SharePoint 2010 kann auch einiges vorbereitet und automatisiert werden, dazu werde ich aber in kürze einen weiteren Blogeitrag erstellen.

  • Share/Bookmark

Moving Average in DAX / BISM Tabular

Hilmar Buchta

SQL Server Denali | PowerPivot

Alberto Ferrari already wrote about calculating moving averages in DAX by using a calculated column. I’d like to present a different approach here by using a calculated measure. For the moving average I’m calculating a daily moving average (over the last 30 days) here.

For my example, I’m using the PowerPivot workbook which can be downloaded as part of the SSAS Tabular Model Projects from the Denali CTP 3 samples.

In this post, I’m developing the formula step by step. However, if you are in a hurry, you might directly want to jump to the final results below.

With calendar year 2003 on the filter, date on columns and sales amount (from table Internet Sales) in the details, the sample data looks like this:

t1

In each row’s context, the expression ‘Date’[Date] gives the current context, i.e. the date for this row. But from a calculated measure we cannot refer to this expression (as there is no current row for the Date table), instead we have to use an expression like LastDate(‘Date’[Date]).

So, in order to get the last thirty days we can use this expression

DatesInPeriod(‘Date’[Date],LastDate(‘Date’[Date]),-30,DAY)

We can now summarize our internet sales for each of those days by using the summarize function:

Summarize(
  DatesInPeriod(‘Date’[Date],LastDate(‘Date’[Date]),-30,DAY)
  ,’Date’[Date]
  , "SalesAmountSum"
  , Sum(‘Internet Sales’[Sales Amount])
)

And finally, we’re using the DAX function AverageX to compute the average of those 30 values:

Sales Amount (30d avg):=AverageX(
  Summarize(
    DatesInPeriod(‘Date’[Date],LastDate(‘Date’[Date]),-30,DAY)
    ,’Date’[Date]
    , "SalesAmountSum"
    , Sum(‘Internet Sales’[Sales Amount])
  )
  ,[SalesAmountSum]
)

This is the calculation that we are using in our Internet Sales table as shown in the screenshot below:

t2

When adding this calculation to the pivot table from above, the result looks like this:

image

Looking at the result it seems that we don’t have any data prior to January 1, 2003: The first value for the moving average is identical to the day value (there are no rows before that date). The second value for the moving average is actually the average of the first two days and so on. This is not quite correct but I’m getting back to this problem in a second. The screenshot shows the computation for the moving average of at January 31 as the average of the daily values from January 2 to 31.

Our calculated measure also works fine when filters are applied. In the following screenshot I used two product categories for the data series:

t3

How does our calculated measure work on higher aggregation levels? In order to find out, I’m using the Calendar hierarchy on the rows (instead of the date). For simplicity I removed the semester and quarter levels using Excel’s pivot table options (Show/Hide fields option).

t4

As you can see, the calculation still works fine. Here, the monthly aggregate is the moving average for the last day of the specific month. You can see this clearly for January (value of 14,215.01 also appears in the screenshot above as the value for January 31). If this was the business requirement (which sounds reasonable for a daily average), then the aggregation works fine on a monthly level (otherwise we will have to fine tune our calculation and this will be a topic of am upcoming post).

But although the aggregation makes sense on a monthly level, if we expand this view to the day level you’ll see that our calculated measure simply returns the sales amount for that day, not the average of the last 30 days anymore:

t5

How can this be. The problem results from the context in which we calculate our sum, as highlighted in the following code:

Sales Amount (30d avg):=AverageX(
  Summarize(
    datesinperiod(‘Date’[Date],LastDate(‘Date’[Date]),-30,DAY)
    ,’Date’[Date]
    , "SalesAmountSum"
    , Sum(‘Internet Sales’[Sales Amount])
  )
 
,[SalesAmountSum]
)

Since we evaluate this expression over the given dates period, the only context that is overwritten here, is ‘Date’[Date]. In our hierarchy we’re using different attributes from our dimension (Calendar Year, Month and Day Of Month). As this context is still present, the calculation is also filtered by those attributes. And this explains why we the current day’s context is still present for each line. To get things clear, as long as we evaluate this expression outside of a date context, everything is fine as the following DAX query shows when being executed by Management Studio on the Internet Sales perspective of our model (using the tabular database with the same data):

evaluate (
    Summarize(
        datesinperiod(‘Date’[Date],date(2003,1,1),-5,DAY)
        ,’Date’[Date]
        , "SalesAmountSum"
        , Sum(‘Internet Sales’[Sales Amount])
    )
)

Here, I reduced the time period to 5 days and also set a fixed date as LastDate(…) would result in the last date of my date dimension table for which no data is present in the sample data. Here is the result from the query:

t6

However, after setting a filter to 2003, no data rows outside of 2003 will be included in the sum. This explains the remark above: It looked like we only have data starting from January 1, 2003. And now, we know why: The year 2003 was on the filter (as you can see in the very first screen shot of this post) and therefore it was present when calculating the sum. Now, all we have to do is to get rid of those additional filters because we’re already filtering our results by Date. The easiest way to do so, is to use the Calculate function and apply ALL(…) for all attributes for which we want to remove the filter. As we have some of those attributes (Year, Month, Day, Weekday, …) and we want to remove the filter from all of them but the date attribute, the shortcut function ALLEXCEPT is very useful here.

If you do have an MDX background you will wonder why we don’t get a similar problem when using SSAS in OLAP mode (BISM Multidimensional). The reason is that our OLAP database has attribute relationships, so after setting the date (key) attribute, the other attributes are automatically changed too and we don’t have to take care about this (see my post here). But in the tabular model we don’t have attribute relationships (not even a true key attribute) and therefore we need to eliminate unwanted filters from our calculations.

So here we are with the …

 

Final results

Sales Amount (30d avg):=AverageX(
  Summarize(
    datesinperiod(‘Date’[Date],LastDate(‘Date’[Date]),-30,DAY)
    ,’Date’[Date]
    , "SalesAmountSum"
    , calculate(Sum(‘Internet Sales’[Sales Amount]), ALLEXCEPT(‘Date’,'Date’[Date]))
  )
,[SalesAmountSum]
)

And this is our final pivot table in Excel:

t7

To illustrate the moving average, here is the same extract of data in a chart view (Excel):

t8

Although we filtered our data on 2003 the moving average for the first 29 days of 2003 correctly takes the corresponding days of 2002 into account. You will recognize the values for January 30 and 31 from our first approach as these were the first days for which our first calculation had a sufficient amount of data (full 30 days).

  • Share/Bookmark

SharePoint 2010 Datenbank Anbindung

Daniel Snellen

Das Szenario kennt jeder Admin, irgendwann reichen die Kapazitäten eines Server nicht mehr aus und z.B. die SQL Datenbanken des SharePoint Servers sollen auf einen neuen oder anderen bestehenden Server umgezogen werden.

Da von so einer Umstellung oft auch andere System betroffen sind geschieht eine solche Umstellung meistens nicht auf einmal, sondern schritt weise, so das dem neuen System nicht einfach der Name des bisherigen Servers gegeben werden kann.

Nun ist hier die Empfehlung von Microsoft auf dem SharePoint Server für den neuen SQL Server einen SQL Alias im SQL Server Configuration Manager einzutragen.
image

Ich habe das so bei uns auch umgesetzt und es funktioniert ohne Probleme. Jedoch müssen hierfür die SQL Server Management Tools auf dem SharePoint Server installiert werden, was aus Sicherheitssicht auch nicht immer gewünscht wird.

Für eine saubere und logische Dokumentation ist dieser Weg auch keine schöne Lösung.

Aus diesem Grund empfehle ich, sich bereits vor der SharePoint Installation einen Virtuellen Name für den SQL Server zu überlegen und dann für diesen im DNS Server einen CNAME Eintrag  zu erstellen bzw. erstellen zulassen der dann auf den jeweils Produktiven SQL Server verweist.

Somit kann recht einfach der SQL Server gewechselt werden ohne die Konfiguration des SharePoint Servers anzupassen und in der Dokumentation muss nur der CNAME Eintrag angepasst werden.

[Update]

Die Einrichtung über einen CNAME ist jedoch nur sinnvoll wenn der Datenbankserver in der standard Instanz betrieben wird. Wenn dies nicht der Fall ist bleibt nur der weg über den SQL Alias.

  • Share/Bookmark

Semi additive measures in DAX / BISM Tabular

Hilmar Buchta

SQL Server Denali | PowerPivot

Semi additive measures, i.e. measures that have to be aggregated differently over different dimensions, are commonly used in BI solutions. One example could be stock levels. Of course we don’t want to sum them up over time, but only over product, location etc. For the time, a different aggregation is used, for example average or last value.

The following example shows how to implement some of the most commonly used semi additive measures in DAX.

In my example I’m using PowerPivot (Denali edition), but the same calculations can be used in a BISM Tabular model in Visual Studio.

In order to keep things simple, I’m using just a short table of test data:

p1

As you see, we only have two products with monthly stock levels in 2010 and 2011.

Although not needed for my semi additive measures, I created additional columns in my PowerPivot sheet for convenient reasons: Year, Month, Day (using the corresponding DAX-function with the same name). I also set the newly created columns, as well as the Stocklevel column to hidden (it makes no sense to sum up the stock level). Although the date information is kept in the same table as the data to keep things simple for this example, I encourage to build a separate date dimension table here (similar idea as with a date dimension in a multidimensional model).

Finally, I created a hierarchy named ‘Calendar’ on my newly created date columns:

p1

Now we’re ready for the semi additive measures.

Average (over time)

Let’s start with an easy one, the average over time. Since we can easily compute the distinct count of our date values, we can simply add up the stock level and divide it by the distinct count. In my example the formula looks like this:

Avg Stock:=Sum([Stocklevel])/DISTINCTCOUNT([Date])

 

Last value (over time)

In order to compute the last value, the DAX function LASTDATE comes in handy. Here is the formula:

Last Stock:=CALCULATE(SUM([Stocklevel]),LASTDATE(‘Stock’[Date]))

 

Min/Max value (over time)

For min/max we have to be a little bit more tricky. In the approach I’m showing here, I’m grouping the table by date by using the SUMMARIZE function and the SUM aggregation. Then I’m using the function MINX or MAXX to find the minimal or maximal value.

Here are the two formulas:

Max Stock:=MINX(SUMMARIZE(‘Stock’,'Stock’[Date],"SumByDate",SUM(‘Stock’[Stocklevel])),[SumByDate])

Max Stock:=MAXX(SUMMARIZE(‘Stock’,'Stock’[Date],"SumByDate",SUM(‘Stock’[Stocklevel])),[SumByDate])

To understand these formulas you can see the effect pretty well after restoring the PowerPivot workbook to a SSAS server in tabular mode. After doing so, we can create a query to show the result of the inner SUMMARIZE function using this DAX query:

evaluate(
SUMMARIZE(‘Stock’,'Stock’[Date],"SumByDate",SUM(‘Stock’[Stocklevel]))
)

Here’s the result:

t4

The MinX or MaxX function simply takes the lowest/highest value from this table.

Now let’s see, how this looks like in Excel. The following screenshot shows the calculations in my PowerPivot sheet:

t2

 

Here’s the result in Excel

t1

And of course, the aggregations also work correctly when filtering the data as shown below (single select on product and multi select on months):

t3

Another cool feature is that besides DAX we can still use standard MDX to query our SSAS tabular model, for example:

select
{[Measures].[Avg Stock],[Measures].[Last Stock],
[Measures].[Min Stock],[Measures].[Max Stock]} on 0,
[Stock].[Calendar].[Year] on 1
from [Model]

t5

A final word about empty (missing) rows: The above calculations need a value of zero as the information that there is no stock at that month. If the value is left blank (no source data row at all), the month itself is treated as missing (interpretation more like we didn’t have this product in our portfolio at all).

  • Share/Bookmark

Product Guide für SQL Server Denali (CTP3) veröffentlicht

David Claßen

Microsoft hat einen Product Guide zum aktuellen CTP3 Release des im kommenden Jahres erscheinenden SQL Server (Denali) veröffentlicht.

Das 456 MB große Paket kann im Microsoft Download Center heruntergeladen werden. 
In diesem Paket sind unterschiedlichste Materialien enthalten, die dem interessierten Anwender die wesentlichen Neuerungen näher bringen.

Die folgenden Materialien sind in dem Paket enthalten:

  • 14 Datenblätter zum CTP3 Release
  • 8 PowerPoint Präsentationen
  • 5 Whitepaper
  • 44 Links zu Online-Videos inklusive 26 Präsentationen von der US-TechEd 2011
  • 6 durchklickbare Demos
  • 26 Links zu Online-Dokumentationen
  • 13 Hands-On Lab Preview Dokumente
  • 13 selbstlaufende Demos

 

Nach dem das Paket heruntergeladen und entpackt wurde befinden sich im Zielverzeichnis mehrere Dateien und Unterordner. Um den Product Guide zu starten, muss die Datei STARTHERE.CMD ausgeführt werden. Es öffnet sich dann der definierte Standard-Browser mit der Startseite des Product Guides. Über die Startseite lassen sich dann alle angebotenen Ressourcen auswählen.

Denali_CTP3_ProductGuide

 

 

 

 

 

 

 

Download des Product Guides:
http://www.microsoft.com/download/en/details.aspx?id=27069

Download SQL Server Code Name “Denali” CTP3:
http://www.microsoft.com/betaexperience/pd/SQLDCTP3CTA/enus/default.aspx

  • Share/Bookmark

Servicepack 1 für den SharePoint Server 2010

Daniel Snellen

Das erste Servicepack für den SharePoint 2010 wurde am 8. Juli von Microsoft veröffentlicht.

Details und Download: http://support.microsoft.com/kb/2460045

  • Share/Bookmark

  • Kategorien

  • Copyright © ORAYLIS Blog. All rights reserved.