Forum Discussion
How to retrieve table data from Power BI desktop into custom visual?
Hello, I've created a table with two columns named "X" and "Y" in Power BI Desktop. Each column contains integers. I also created a custom visual that I can import into Power BI Desktop. Is there a way for me to read data from the X and Y columns into my custom visual using TypeScript only or do I need some sort of external library to do so? Thanks.
I figured it out. Had to modify capabilities.json and use DataViewMappings in my visual.ts file.
8 Replies
- RichardLMicrosoft Employee
I figured it out. Had to modify capabilities.json and use DataViewMappings in my visual.ts file.
- RichardLMicrosoft Employee
Cake walk in the park :)
- v-chuncz-msftCommunity Support
Glad to hear that you've solved this problem and thank you for sharing the solution. You could mark it as answer so that other community members might gain benefits.
- mpoHelper II
Could you post what you ended up with, by any chance? I think I have a similar problem and don't know how to access table data mapping values in visual.ts.
- RichardLMicrosoft Employee
First, I would read this introduction on DataView: DataView Introduction
Also go over DataViewMappings here: DataViewMappings
Then follow this great example: Build Your Custom Visuals Power BI
I believe those three links above will set you on the right track. Good luck.