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

Top Solution Authors