Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredJoin 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.
Hello everybody,
I am new to Power Bi and I would like you to help me with the creation of a table. I think it's simple but none of the ways I've tried has worked
I have this data table, which has the following columns "Code", "Date" and "Type"
| Code | Date | Type |
| 001 | 01-01-2021 | A |
| 001 | 02-01-2021 | B |
| 001 | 05-01-2021 | C |
| 001 | 10-01-2021 | B2 |
| 001 | 11-01-2021 | C2 |
| 002 | 01-01-2021 | A |
| 002 | 05-01-2021 | B |
| 002 | 07-01-2021 | C |
| 003 | 04-01-2021 | A |
| 003 | 05-01-2021 | B |
| 004 | 01-01-2021 | A |
| 004 | 02-01-2021 | B |
| 004 | 03-01-2021 | A2 |
| 004 | 07-01-2021 | B2 |
| 004 | 11-01-2021 | A3 |
And that reflects the dates that the activities of the following process were carried out
what I want to achieve in power query is a table like this
| Code | A-B | B-C | C-B2 | B2-C2 | B-A2 | A2-B2 | B2-A3 |
| 001 | 1 | 1 | 1 | 1 | |||
| 002 | 1 | 1 | |||||
| 003 | 1 | ||||||
| 004 | 1 | 1 | 1 | 1 |
the number of loops that can occur in the process is unknown, so Table 2 has to be created from scratch from Table 1
This is a table where all movements are marked with a 1 for each code.
For example, for code 004, it started at "A" then went to "B", then column "A-B" was marked with a 1, then it went back from "B" to "A2", so column "B-A2" was marked with a 1, etc ...
If someone could help me I would be very grateful
Thank you
Solved! Go to Solution.
Hello, heres a link to a solution for you. Probably, you want to supress loading of the start and end tables but have left so you can see the logic.
Hello, have fixed in the file i uploaded before (ProcessFlowExample). Just needed one more step introduced
Hello, heres a link to a solution for you. Probably, you want to supress loading of the start and end tables but have left so you can see the logic.
It is almost perfect, Thanks :), the only thing that is not correct is that it is joining the last type of a code with the first type of the following code,
for example for the code "001" the flow "C2-A" appears, where that is impossible. The last type of "001" (C2) is being joined with the first of "002" (A)
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the October 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 76 | |
| 38 | |
| 31 | |
| 27 | |
| 26 |