Forum Discussion
syldia
6 years agoRegular Visitor
Return Value from Another Column
ORIGINAL POST Hi There, I have a table of my customers and their purchase activities broken down by date (Customer ID, Date, Order ID, Source). I would like to create a measure that can r...
- 6 years ago
try
First Session Source = var FirstPurchaseDate = calculate(MIN('Users'[sl_timeStamp]),ALLEXCEPT('Users','Users'[User])) return calculate(FIRSTNONBLANK('Users'[source],1),FILTER(ALL('Users'),'Users'[User]=SELECTEDVALUE('Users'[User]) && 'Users'[sl_timeStamp]=FirstPurchaseDate))do not hesitate to give a kudo to useful posts and mark solutions as solution
sanalytics
6 years agoSuper User
Hey syldia
Can you attach a dummy data and your expected output.It will help us to solve..
Regards,
Snandy
- az386 years agoCommunity Champion
hi syldia
try a measure in your customer table
FirstPurchaseSource = var FirstPurchaseDate = calculate(MIN('purchase activities'[Date])) return calculate(FIRSTNONBLANK('purchase activities'[Source];1);'purchase activities'[Date]=FirstPurchaseDate)do not hesitate to give a kudo to useful posts and mark solutions as solution
- syldia6 years agoRegular Visitor
I just added it, got the following error
The syntax for ';' is incorrect. (DAX(var FirstPurchaseDate = calculate(MIN('Users'[sl_timeStamp]))return calculate(FIRSTNONBLANK('Users'[source];1);'Users'[sl_timeStamp]=FirstPurchaseDate))).
Thanks