• Hi all, applogy to given some wrong information. Here Cube Name :Testcube....> its having measures expected,payment.

    dimensions: dimpatient: its having attribute is pn

    Dimprcode: its having attribute is prcode

    Dimdate: its having attribute is dos

    based on this attributes and measures for one pn having sample data like below

    pn prcode dos ExpectedPayment

    MS0000003PT0011/2/201329.72 0

    MS0000003PT0011/21/201357.1 0

    MS0000003PT0026/7/201326.69 0

    MS0000003PT0026/7/201389.16 0

    MS0000003PT0026/6/201357.1 0

    MS0000003PT0026/7/201312.28 0

    MS0000003PT0026/7/201326.69 26.69

    MS0000003PT0026/7/201389.16 77.16

    MS0000003PT0026/17/201357.1 57.1

    Based on this data i required output like below

    pn prcode maxdos list of servicedays(max of dos-min of dos) Expected Payment

    MS0000003PT001 1/21/2013 19 86.82 0

    MS0000003PT002 6/17/2013 11 358.18 160.98

    Please tell me how to write mdx query based on this cube .