Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more.
Get startedGrow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.
My data is as shown below, I want to record date of second sales made by a salesperson in another column. Here Mathew has made two sales on same day, so second sales should be marked in another column.
Help to find dax for the same.
Thanks in advance.
Solved! Go to Solution.
Hi @Anonymous ,
Here are the steps you can follow:
1. Create calculated column.
rank = RANKX(FILTER(ALL('Table'),'Table'[SalesPerson]=EARLIER('Table'[SalesPerson])),[Sl No],,ASC)
Second Sales Date =
var _1=CALCULATE(MAX('Table'[Sales Date]),FILTER(ALL('Table'),'Table'[rank]=2&&'Table'[SalesPerson]=EARLIER('Table'[SalesPerson])))
return
IF(
[rank]=2,_1,BLANK())
2. Result:
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Hi @Anonymous ,
Here are the steps you can follow:
1. Create calculated column.
rank = RANKX(FILTER(ALL('Table'),'Table'[SalesPerson]=EARLIER('Table'[SalesPerson])),[Sl No],,ASC)
Second Sales Date =
var _1=CALCULATE(MAX('Table'[Sales Date]),FILTER(ALL('Table'),'Table'[rank]=2&&'Table'[SalesPerson]=EARLIER('Table'[SalesPerson])))
return
IF(
[rank]=2,_1,BLANK())
2. Result:
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
HI @Anonymous
Try this:
Column =
VAR _D =
CALCULATE ( MAX ( [Made Sales On] ), ALLEXCEPT ( table, table[SalesPerson] ) )
RETURN
IF ( [Made Sales On] = _D, _D, BLANK () )
If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
LinkedIn: www.linkedin.com/in/vahid-dm/
User | Count |
---|---|
78 | |
75 | |
62 | |
60 | |
47 |
User | Count |
---|---|
109 | |
95 | |
86 | |
79 | |
61 |