Forum Discussion
Anonymous
5 years agoNot applicable
rows to columns
Hi guys,
I have the following table
| Patient# | Patient Name | Test | Sub-Test | Result Value | Result Units | Insurance |
| 333 | Abhi | A | 1 | 23 | mg | Yes |
| 333 | Abhi | A | 2 | 12 | U/l | Yes |
| 333 | Abhi | A | 3 | 21 | pg/ml | Yes |
| 333 | Abhi | B | 2 | 65 | fl | Yes |
| 534 | Mish | B | 1 | 23 | mg | No |
| 534 | Mish | B | 2 | 22 | fl | No |
| 670 | Josh | A | 3 | 35 | pg/ml | Yes |
| 670 | Josh | B | 1 | 27 | mg | Yes |
I need to convert to the following table...
| Patient# | Patient Name | A | B | Insurance | |||
| 1 | 2 | 3 | 1 | 2 | Yes | ||
| 333 | Abhi | 23 mg | 12 U/l | 21 pg/ml | null | 65 fl | Yes |
| 534 | Mish | null | null | null | 23 mg | 22 fl | No |
| 670 | Josh | null | null | 35 pg/ml | 27 mg | Yes |
Are you sure you want to do that in Power Query? This would be much easier to do in the Power BI user interface.
1 Reply
- lbendlinSuper User
Are you sure you want to do that in Power Query? This would be much easier to do in the Power BI user interface.