Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hi guys,
I have a question:
I need to identify the first order (based on the date) for the person and insert "1" into the new column and for other orders (which are not first) insert 0.
One person can have 2 or more orders but 1 personal id.
Which DAX formula should I use?
Solved! Go to Solution.
Try this formula:
Hi,
Try this calculated column formula
=IF(Data[Date Created]=CALCULATE(MIN(Data[Date Created]),FILTER(Data,Data[Personal id]=EARLIER(Data[Personal id]))),1,0)
Hope this helps.
Hi @Anonymous,
By my tests, the solution from Ashish_Mathur and Arslan should be helpful.
If you have solved your problem, please accept the replies making sense as solution to your question so that people who may have the same question can get the solution directly.
If you still need help, please feel free to ask.
Best Regards,
Cherry
Hi @Anonymous,
By my tests, the solution from Ashish_Mathur and Arslan should be helpful.
If you have solved your problem, please accept the replies making sense as solution to your question so that people who may have the same question can get the solution directly.
If you still need help, please feel free to ask.
Best Regards,
Cherry
Done! 🙂
Hi,
Try this calculated column formula
=IF(Data[Date Created]=CALCULATE(MIN(Data[Date Created]),FILTER(Data,Data[Personal id]=EARLIER(Data[Personal id]))),1,0)
Hope this helps.
Thank you @Ashish_Mathur your formula was very useful!!! Sorry for the late reply 🙂
Try this formula:
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
Check out the November 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 66 | |
| 48 | |
| 43 | |
| 26 | |
| 19 |
| User | Count |
|---|---|
| 198 | |
| 126 | |
| 102 | |
| 67 | |
| 50 |