Forum Discussion
First Sales Value
- 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.
My advice would be to add a calculated column to determine if the order is first order date, then use FILTER function and AVERAGEX:
MEASURE = AVERAGEX(FILTER(sales, Sales[ISFIRSTDATE]="Yes"),SalesAmt)
I have a master list of all the customers where the total consolidated historical sales is available. In the same table, I have fetched the FirstDate of order per customer. Now i need the first order value. I have attached a picture of the query.
- AllisonKennedy6 years agoCommunity ChampionWe'll need to see the column headings for the orders table to help more. Also, what formula did you use for the First Sales Date and what are the names of your tables? The process will be similar.
- rohanjha19886 years agoHelper II
There are 2 tables - Sales Master and Customer Master
Sales Master:- It has order wise details of customers. I have attached the screenshot.
Cust Master :- In this all the basic details like Customer Id, name etc is given. For calculating the firstdate i have used following formula :-
First Sales Date =CALCULATE(FIRSTDATE(SalesMaster[Sales Date (DD-MM-YYYY)]))
Ideally I want to create a measure using this First Sales Date as an input.