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

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

Reply
edenekamp
Regular Visitor

Function value to Column

Hello,

 

I'am new to Power Bi and have a question. This is my code to get some security product info. This is working. Now i want to add an extra column with the function value (Agent_ID). Can someone help me with this? Thanks a lot.

 

(Agent_ID as text) =>

let
Api_Token = VSAToken,
Source = Json.Document(Web.Contents("https://euvsa16.kaseya.net/api/v1.0/assetmgmt/audit/" & Agent_ID &"/software/securityproducts?$filter=IsActive eq true and ProductType eq 'Antivirus'",[Headers=[authorization="Bearer "&Api_Token]])),
#"Geconverteerd naar tabel" = Table.FromRecords({Source}),
#"Result uitgevouwen" = Table.ExpandListColumn(#"Geconverteerd naar tabel", "Result"),
#"Result uitgevouwen1" = Table.ExpandRecordColumn(#"Result uitgevouwen", "Result", {"ProductType", "ProductName", "Manufacturer", "Version", "IsActive", "IsUpToDate", "Attributes"}, {"Result.ProductType", "Result.ProductName", "Result.Manufacturer", "Result.Version", "Result.IsActive", "Result.IsUpToDate", "Result.Attributes"})
in
#"Result uitgevouwen1"

1 ACCEPTED SOLUTION
mahoneypat
Microsoft Employee
Microsoft Employee

On the Add Column tab in the query editor, you can Invoke Custom Function, choose your function from the dropdown and your [Agent_ID] column as the input. Or you can add a custom column and use fxYourFunction([Agent Column]) too.


Pat





Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


View solution in original post

1 REPLY 1
mahoneypat
Microsoft Employee
Microsoft Employee

On the Add Column tab in the query editor, you can Invoke Custom Function, choose your function from the dropdown and your [Agent_ID] column as the input. Or you can add a custom column and use fxYourFunction([Agent Column]) too.


Pat





Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

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.

Top Kudoed Authors