Forum Discussion

ROG's avatar
ROG
Icon for Responsive Resident rankResponsive Resident
2 years ago
Solved

dax explanation for 7D AVG

Hi all,

 

Can you explain me the logic below?

 

 

 

ROLLING_7D_AVG_CON = VAR NumOfDays = 7
VAR LastCurrentDate =
    MAX (Channel_Data[DATE])
VAR Period =
    DATESINPERIOD (Channel_Data[DATE], LastCurrentDate, - NumOfDays, DAY )
VAR Result =
    CALCULATE (
        AVERAGEX (
            VALUES (Channel_Data[DATE]),
            [TOTAL_CONVERSIONS]
        ),
        Period
    )
RETURN
Result
 
Thank you.
  • ROG 

    This measure computes the rolling average of the [TOTAL_CONVERSIONS] over the past 7 days relative to the latest date in your dataset.

     

    BBF

1 Reply

  • ROG 

    This measure computes the rolling average of the [TOTAL_CONVERSIONS] over the past 7 days relative to the latest date in your dataset.

     

    BBF