Forum Discussion

rohanjha1988's avatar
rohanjha1988
Helper II
6 years ago
Solved

First Sales Value

Hi All, Need one small help :-   I have day wise client wise sales data for last 7 years. I need to calculate the average value of first order of clients. I have calculated the first sales date by ...
  • Ashish_Mathur's avatar
    6 years ago

    Hi,

    Create a Calendar Table and build a relationship from the Date column of your Data Table to the Date column of your Calendar Table.  Write these measures:

    Date of first interaction = Calculate(min(Data[Sales Date]),datesbetween(Calendar[Date],minx(all(Calendar),Calendar[Date]),max(Calendar[Date])))

    Sale on first date = calculate(sum(Data[Total sale]),datesbetween(Calendar[date],[Date of first interaction],[Date of first interaction]))

    To your visual, drag Customer from the Data table and the second measure.

    Hope this helps.