Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
prabhat_m
Frequent Visitor

Need help converting a powershell code to Mquery

Powershell Code:.

$type ="P"
$version="1"
$marker="DP"
$path="piserver\test:sinusoid.pv"
$enc = [system.Text.Encoding]::UTF8
$data = $enc.GetBytes($path.ToUpperInvariant())
$result=[System.Convert]::ToBase64String($data)
$result=$result.trimend("=").replace("+", "-").replace("/", "_")
$webid=$type+$version+$marker+$result
$webid

 

Stuck at the getbytes part.

1 ACCEPTED SOLUTION
wdx223_Daniel
Community Champion
Community Champion

= List.Transform(Text.ToList("YXGXWFEDGF"),Character.ToNumber)

View solution in original post

2 REPLIES 2
prabhat_m
Frequent Visitor

Thanks 

@wdx223_Daniel worked as expected

wdx223_Daniel
Community Champion
Community Champion

= List.Transform(Text.ToList("YXGXWFEDGF"),Character.ToNumber)

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.