Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
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 |
---|---|
8 | |
7 | |
5 | |
5 | |
4 |
User | Count |
---|---|
14 | |
13 | |
8 | |
6 | |
6 |