The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.
Hi,
I have a large dataset of product sales for the last 5 years that creates a new row if the customer bought more than one product in the sale. I want to be able to add a custom column (Orders) that will place a 1 next to the first row with a matching Order Date and Customer ID and then a null for any repeat rows for that order.
For example
Order Date | Customer ID | Orders |
2/2/2024 | 121212 | 1 |
2/2/2024 | 121212 | null |
2/2/2024 | 123456 | 1 |
3/2/2024 | 444444 | 1 |
3/2/2024 | 343434 | 1 |
3/2/2024 | 121212 | 1 |
3/2/2024 | 444444 | nulll |
What is the easiest way to do this?
Thanks for your help,
A
Solved! Go to Solution.
maybe you can try this
1. create an index column in PQ
2. use DAX to create a column
Proud to be a Super User!
maybe you can try this
1. create an index column in PQ
2. use DAX to create a column
Proud to be a Super User!
User | Count |
---|---|
65 | |
60 | |
55 | |
54 | |
32 |
User | Count |
---|---|
180 | |
88 | |
70 | |
46 | |
45 |