Forum Discussion

francoisl's avatar
francoisl
Icon for Helper II rankHelper II
5 years ago
Solved

measure ignoring hierarchy

Hi all,    I guess I still have not understood the all and allexcept and hopefully my explanation of the problem will be clear.    Here's my problem:  Date table with the following :  date     ...
  • v-jingzhang's avatar
    5 years ago

    Hi francoisl 

     

    In your scenario, if you want to get the total of sales in a period/week last year, you can try below measure. Add ALL to the DateTable.

    LYSales =
    CALCULATE (
        SUM ( 'SalesTable'[sales] ),
        FILTER (
            ALL ( 'DateTable' ),
            'DateTable'[FISCAL_PERIOD] = [CurrentPeriod]
                && 'DateTable'[FISCAL_WEEK] = [CurrentWeek]
                && 'DateTable'[FISCAL_YEAR] = [LastFiscYear]
        )
    )
    

    Regards,
    Community Support Team _ Jing
    If this post helps, please Accept it as the solution to help other members find it.