Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago
Solved

Measure Total Issue - "True'' average

Hi all!   I need your help! I have this measure:  Single_Res RpD LY WeekDay (DB) = VAR CurrentDate = MAX(RezReporting[Date Booked 2]) RETURN (CALCULATE([Res RpD], FILTER(ALL('Date Booke...
  • Anonymous's avatar
    Anonymous
    7 years ago

    Hi all!

     

    I was hoping to have a more efficient DAX code, but I managed to get the desired results by using the following:

     

    Res RpD LY WeekDay (DB) =
        IF(
            HASONEFILTER('Date Booked'[Date Booked]),
            [Single_Res RpD LY WeekDay (DB)],
            DIVIDE(
                SUMX(
                    'Date Booked',
                    [Res Rate+Surch+VLF LY Weekday]),
                    SUMX(
                         'Date Booked',
                        [Res Days LY WeekDay (DB)])))
    So this case is closed for now.
     
    Thanks!
    Merel