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
Markus_P
Regular Visitor

two variables in data view mapping

Hello

 

I am struggling with data view mapping. I want to get two variables (numbers) via two data fields in my project. Using single I have only managed to get one variable working. I have then tried using a table. That worked but there I have the problem that the table is field in order in with the user has inserted the values in the data field. I am reading the table in Order. But I need it distinct. I have also tried using a matrix, but I am unable to access the data in the code. With categorical I was not able to access it in the code. I have seen the documentation, but I am not fully understanding data view mapping.

Has anyone an idea?

Thanks

2 REPLIES 2
Markus_P
Regular Visitor

Hello

 

I hope I can help someone with this Information. I solved it via the Roles of Collums. I get the index, with this Index I know in which order the data was read in.

 

To get the Index I use:

let resultCY = dataView.table.columns.filter( (col) => col.roles["CY"])

 

I got this Information from:

https://community.powerbi.com/t5/Developer/Best-practice-for-accessing-row-data-in-dataView-table/m-...

 

Thanks

 

 

v-shex-msft
Community Support
Community Support

Hi @Markus_P,

I'd like to suggest you refer the following blog about create relationship with multiple columns:

Relationship in Power BI with Multiple Columns - RADACAD
Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

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.