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

The Power BI Data Visualization World Championships is back! It's time to submit your entry. Live now!

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
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.