Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now
i have a table like below
| date | team | d1 | m1 | d2 | m2 |
| 1 | a | aa | 2 | cc | 3 |
| 2 | b | bb | 4 | dd | 5 |
i need like below
| date | team | d | m |
| 1 | a | aa | 2 |
| 2 | b | bb | 4 |
| 1 | a | cc | 3 |
| 2 | b | dd | 5 |
Hi
let
Source = YourSource,
UnPivot = Table.UnpivotOtherColumns(Source, {"date", "team"}, "Attribut", "Valeur"),
SplitColumn = Table.SplitColumn(UnPivot, "Attribut", Splitter.SplitTextByCharacterTransition((c) => not List.Contains({"0".."9"}, c), {"0".."9"}), {"Attribut.1", "Attribut.2"}),
Pivot = Table.Pivot(SplitColumn, List.Distinct(SplitColumn[Attribut.1]), "Attribut.1", "Valeur")
in
Pivot
Stéphane
| User | Count |
|---|---|
| 4 | |
| 3 | |
| 2 | |
| 2 | |
| 2 |
| User | Count |
|---|---|
| 15 | |
| 8 | |
| 6 | |
| 5 | |
| 5 |