Starting December 3, join live sessions with database experts and the Microsoft product team to learn just how easy it is to get started
Learn moreGet certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now
Hi!
So I'm trying to create a column with the main product category in the second order from each individual customers.
I have already created a column for the First Order, since the date of the first order exists in the dataset. See below formula:
Any ideas how one might solve this?
Thanks!
Solved! Go to Solution.
@ErikOmni , there are two equal sign, that seem problem to me
Main Category_Second Order =
VAR __Cust = [CustomerID]
VAR __Second = 2
VAR __Table = FILTER(OrderData,[CustomerID] = __Cust && OrderData[Order Rank] = __Second)
VAR __Max = MAXX(__Table,[Total Sales])
VAR __Category = MAXX(FILTER(__Table,[Total Sales] = __Max),[Category])
RETURN
__Category
@ErikOmni , there are two equal sign, that seem problem to me
Main Category_Second Order =
VAR __Cust = [CustomerID]
VAR __Second = 2
VAR __Table = FILTER(OrderData,[CustomerID] = __Cust && OrderData[Order Rank] = __Second)
VAR __Max = MAXX(__Table,[Total Sales])
VAR __Category = MAXX(FILTER(__Table,[Total Sales] = __Max),[Category])
RETURN
__Category
Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.
User | Count |
---|---|
89 | |
88 | |
82 | |
64 | |
49 |
User | Count |
---|---|
125 | |
111 | |
88 | |
69 | |
66 |