Forum Discussion
AntonN
1 year agoFrequent Visitor
Custer/Flag Rows before Sale by Sale Date
Hi! In my data I have the first 3 columns from the table below, in which the rows are ordered descending by date. According to this data, the customer can make a few applications until eventually gen...
- 1 year ago
hi AntonN ,
in Power Query, you can duplicate Sale ID column and fill down.
https://learn.microsoft.com/en-us/power-query/fill-values-column
- 1 year ago
New Column:
Sale ID Distributed =
VAR CurrentDate = 'YourTable'[Date]
VAR CurrentType = 'YourTable'[Type]
RETURN
IF (
CurrentType = "Application",
VAR PreviousSale =
CALCULATE (
MAX ( 'YourTable'[Sale ID] ),
FILTER (
'YourTable',
'YourTable'[Date] < CurrentDate &&
'YourTable'[Type] = "Sale"
)
)
RETURN
IF (
ISBLANK(PreviousSale),
BLANK(),
PreviousSale
),
'YourTable'[Sale ID]
)Once you have created the calculated column using the above formula, you should see the appropriate Sale ID distributed to the Application rows as required.
💌If this helped, a Kudos 👍 or Solution mark would be great! 🎉
Cheers,
Kedar
Connect on LinkedIn
AntonN
1 year agoFrequent Visitor
Kedar_Pande , thanks a lot! Can this be done per category?