Microsoft is giving away 50,000 FREE Microsoft Certification exam vouchers!
Enter the sweepstakes now!See when key Fabric features will launch and what’s already live, all in one place and always up to date. Explore the new Fabric roadmap
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)
User | Count |
---|---|
91 | |
74 | |
71 | |
58 | |
55 |
User | Count |
---|---|
41 | |
38 | |
34 | |
32 | |
30 |