Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi everyone. I need assistance with a topic.
I have the following collumn of Order ID and Product:
Order ID | Product |
001 | Apple |
002 | Apple |
003 | Banana |
004 | Banana |
005 | Pear |
006 | Apple |
I'm trying to create a column in which i have a list, like:
Order ID | Product | Order of the Item |
001 | Apple | 1 |
002 | Apple | 2 |
003 | Banana | 1 |
004 | Banana | 2 |
005 | Pear | 1 |
006 | Apple | 3 |
I wanna know which order of each product it was, as in "the order ID 006 was the third time an Apple was ordered".
Thanks.
Solved! Go to Solution.
Hi @Quartarolo ,
Check the attached file.
Another approach only using lists:
let
_product = [Product],
_order = [Order ID]
in
List.Count(
List.Select(
List.FirstN(#"Sorted Rows"[Product], _order),
each _ = _product))
Hi @Quartarolo ,
Check the attached file.
Another approach only using lists:
let
_product = [Product],
_order = [Order ID]
in
List.Count(
List.Select(
List.FirstN(#"Sorted Rows"[Product], _order),
each _ = _product))
Thank you very much!
It worked perfectly!!
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
107 | |
99 | |
76 | |
64 | |
58 |
User | Count |
---|---|
148 | |
113 | |
97 | |
84 | |
67 |