Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
Hi,
How can I add the "From" and "To" column for the hierarchy as shown in the image? Could you please help me with this?
I want to count the number of people who transferred from one location to another, grouped by region and location.
thanks,
Solved! Go to Solution.
@Uldevi
You need to first UnPivot the lat two columns (From and To) then use a simple measure to Count the ROWS: file attached.
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45W8sxLyUxU0lHySszTNTIBMooS87IySzKALJfUnIxMIO2UnlOkFKuDUOuWmqRrZIqiFqxGR8m3NDcpMRNFsW9ipa6RGYriXIgqHaXs/OzEkkQ05UUQd5RlFiVm4XNFcGqBrpE5kkrcbvBPLtE1tERSiuGCWAA=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [country = _t, date = _t, name = _t, #"transferred from" = _t, #"transferred to" = _t]),
#"Changed Type" = Table.TransformColumnTypes(Source,{{"country", type text}, {"date", type date}, {"name", type text}, {"transferred from", type text}, {"transferred to", type text}}),
#"Unpivoted Other Columns" = Table.UnpivotOtherColumns(#"Changed Type", {"country", "date", "name"}, "FromTo", "Location")
in
#"Unpivoted Other Columns"
⭕ Subscribe and learn Power BI from these videos
⚪ Website ⚪ LinkedIn ⚪ PBI User Group
@Uldevi
You need to first UnPivot the lat two columns (From and To) then use a simple measure to Count the ROWS: file attached.
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45W8sxLyUxU0lHySszTNTIBMooS87IySzKALJfUnIxMIO2UnlOkFKuDUOuWmqRrZIqiFqxGR8m3NDcpMRNFsW9ipa6RGYriXIgqHaXs/OzEkkQ05UUQd5RlFiVm4XNFcGqBrpE5kkrcbvBPLtE1tERSiuGCWAA=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [country = _t, date = _t, name = _t, #"transferred from" = _t, #"transferred to" = _t]),
#"Changed Type" = Table.TransformColumnTypes(Source,{{"country", type text}, {"date", type date}, {"name", type text}, {"transferred from", type text}, {"transferred to", type text}}),
#"Unpivoted Other Columns" = Table.UnpivotOtherColumns(#"Changed Type", {"country", "date", "name"}, "FromTo", "Location")
in
#"Unpivoted Other Columns"
⭕ Subscribe and learn Power BI from these videos
⚪ Website ⚪ LinkedIn ⚪ PBI User Group
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
144 | |
85 | |
65 | |
51 | |
45 |
User | Count |
---|---|
217 | |
88 | |
81 | |
65 | |
56 |