• doug.brown (11/3/2016)


    (Sorry, response in English) If I understand the Google translate correctly, you'll need to add something to your query to also include the sales from a year ago. Here's a pseudo-code example:

    SELECT

    sale_date

    ,SUM([Amount sale]) as Sales

    FROM sales

    WHERE sale_date = @date

    OR sale_date = DATEADD(YEAR, -1, @date)

    GROUP BY sale_date

    I believe that you understood correctly, except for the part that the OP needs to get the MDX query instead of T-SQL.

    I know it's possible but my skills on MDX are just enough to understand it, but not create new code.

    La plupart des utilisateurs de ce forum parlent anglais et seulment quelques-uns parlent français. Vous obtiendrez une meilleure aide si vous publiez en anglais.

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2