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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Bringing an array of data from a table into a custom function

So I want to create some custom charts/graphs in power bi by using svg methods. To do this, I want to create a table that will have one row with a column for each chart which will be a basic html page with an svg in it that will be displayed using html viewer. The easiest way to show this will be to attach the pbix file here.

 

I have dummy data in the query, but I want to be able to pass in data from another table (in this case "Year Prices"). This table has 2 columns (Year and Price) that I want to basically send the entire data set into the function. The values going into the function at the moment are just dummy text fields, but how can I reference all this data from the function? Can I send in the required data as a json string or something somehow? Or can I send in a table name and the 2 column names and access them from within the query?

 

Initial Test File

1 ACCEPTED SOLUTION
Anonymous
Not applicable

I now have a table coming in as a table, it was simply to make it:

(tablename as table)=>
let
    source = "Something"
in
    source

 

Updated example here.

 

Now, however, I can't work out how to loop through the table and process the data, started another thread, Could you please look here?

View solution in original post

2 REPLIES 2
v-danhe-msft
Employee
Employee

Hi @Anonymous ,

It seemed I could not achieve your pbix file:

1.PNG

Could you please check it again?

 

Regards,

Daniel He

Community Support Team _ Daniel He
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

I now have a table coming in as a table, it was simply to make it:

(tablename as table)=>
let
    source = "Something"
in
    source

 

Updated example here.

 

Now, however, I can't work out how to loop through the table and process the data, started another thread, Could you please look here?

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.