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
Jonas_Jonas
Frequent Visitor

Rest: Extract a List which contains Records

Hello,

 

I'm currently working with REST as datasource for a small project.

 

That's the rest result:

 

 "customfield_1": [
          {
            "self": "https",
            "value": "Dev",
            "id": "2"
          },
          {
            "self": "https",
            "value": "Project",
            "id": "3"
          },
          {
            "self": "https",
            "value": "Care",
            "id": "4"
          }
        ],

 

So I have an atttribute which contains a list of records. For our project I want to know the three values of the attribute "customfield_1". But if I expand the attribute "customfield_1" Power Bi copies the entire line three times once with "Care", once with "Project" and once with "Dev". Which means if I have an additional attribute called "Priority_Value" with the value 5 and I create a graphic Power Bi shows us a priorty_value of 15 because it acts like the three instances are separate but in fact are the same line.

 

Does someone have a solution for that problem? I would like to combine the three values in one cell and not in three seperate instances of the same result.

 

So it should be like this:

 

customfield_1: "Dev; Project; Care"

and not like this:

 

customfield_1: "Dev"
customfield_1: "Project"
customfield_1: "Care"

 

To expand on the problem:

 

That’s how I get the data:

 

ID

Cash

Customfield_1

Check

1

10000

Dev

Yes

1

10000

Project

Yes

1

10000

Care

Yes

 

That’s how it should be:

ID

Cash

Customfield_1

Check

1

10000

Dev; Project; Care

Yes

 

Best Regards.

Jonas_Jonas

2 REPLIES 2
v-caliao-msft
Employee
Employee

Hi @Jonas_Jonas,

 

To transfer data structure from
customfield_1: "Dev"
customfield_1: "Project"
customfield_1: "Care"

to
customfield_1: "Dev; Project; Care"

You can use pivot and unpivot featrure in Power BI. Turning columns to rows, or rows to columns is easy with Power Query and Power BI. Here is a document which describes basic pivot and unpivot in Power BI.

http://radacad.com/pivot-and-unpivot-with-power-bi

 

Regards,

Charlie Liao

Hi,

 

i added some information to the problem description

 

Best regards.

Jonas_Jonas

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.