Category: MDX

  • Get The MAX Date From A Cube Using MDX

    Here’s the goal: populate a sql variable with the max date from one of the dimensions in a cube. It takes a little bit of unusual code but it’s relatively simple so pay attention! It’s probably important to note this code is assuming you are using a smart key for your date dimension (e.g. the […]

  • Formatting MDX and DAX: Free Online Tool From Microsoft

    Ever cut and paste a mess of generated MDX from Excel? How about a coworker who doesn’t know how to use the “tab” key when working in SQL Server Management Studio? I came across this no frills online MDX formatter from “Microsoft Labs” and have been using it for the last few days to clean […]

  • Clearing the SQL Server Analysis Services Cache

    Preparing to do some MDX performance testing?  Step one for each and every test should be to clear the cache.  This will ensure you are seeing the performance results without the benefit of having data already loaded up in memory.  How do you empty the MS SQL Analysis Services cache prior to running your query?