• Eirikur Eiriksson (3/13/2016)


    This should work, I have models using this so I wonder why it doesn't work in your case, your version certainly supports it.

    😎

    BTW: I normally use a similar function as Jeff because it is supported in wider range of products.

    Could it be that someone simply didn't enable or maybe didn't install SSAS components?

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)