Microsoft is giving away 50,000 FREE Microsoft Certification exam vouchers. Get Fabric certified for FREE! Learn more
Hi Everyone,
My dataset looks like:
Date | Product |
1/1/2022 | Table |
1/1/2022 | Chair |
1/1/2022 | Seat |
1/1/2022 | Monitor |
1/1/2022 | Monitor |
1/1/2022 | PC |
1/1/2022 | Laptop |
1/2/2022 | Table |
1/2/2022 | Chair |
1/2/2022 | Seat |
1/2/2022 | Monitor |
1/2/2022 | Laptop |
1/2/2022 | Laptop |
1/2/2022 | Table |
1/2/2022 | Chair |
I would like to add a 3rd column where occurence of product is counted. The output would look like:
Date | Product | Occurence |
1/1/2022 | Table | 1st |
1/1/2022 | Chair | 1st |
1/1/2022 | Seat | 1st |
1/1/2022 | Monitor | 1st |
1/1/2022 | Monitor | 2nd |
1/1/2022 | PC | 1st |
1/1/2022 | Laptop | 2nd |
1/2/2022 | Table | 2nd |
1/2/2022 | Chair | 2nd |
1/2/2022 | Seat | 2nd |
1/2/2022 | Monitor | 2nd |
1/2/2022 | Laptop | 3rd |
1/2/2022 | Laptop | 4th |
1/2/2022 | Table | 3rd |
1/2/2022 | Chair | 3rd |
How do I achieve this in dax?
Thanks!
Solved! Go to Solution.
@adityamalik1234 , You can create a Rank Column
A new column = rankx(filter(Table, [Product] =earlier([Product]) ), [Date],,asc,dense)
You can append text in a new column as per need
@adityamalik1234 , You can create a Rank Column
A new column = rankx(filter(Table, [Product] =earlier([Product]) ), [Date],,asc,dense)
You can append text in a new column as per need
Check out the April 2025 Power BI update to learn about new features.
Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.
User | Count |
---|---|
98 | |
61 | |
47 | |
36 | |
34 |