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

A new Data Days event is coming soon! This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. Don't miss out.

Reply
PowerBI88
Resolver I
Resolver I

How to plot Dynatrace metrics api data to Power BI Linechart

Hi,

I am having some problems in plotting the data from dynatrace API. Indeed they come in a particular json format, like the following:

 

 

"data": [
                {
                    "dimensions": [
                        "HOST-177FFDC0829EAC9C"
                    ],
                    "dimensionMap": {
                        "dt.entity.host": "HOST-177FFDC0829EAC9C"
                    },
                    "timestamps": [
                        1709648340000,
                        1709648400000,
                        1709648460000,
                        1709648520000,
                        1709648580000,
                        1709648640000,
                        1709648700000,
                        1709648760000,
                        1709648820000,
                        1709648880000,
                        1709648940000,
                        1709649000000,
                        1709649060000,
                        1709649120000,
                        1709649180000,
                        1709649240000
                    ],
                    "values": [
                        100,
                        100,
                        100,
                        100,
                        100,
                        100,
                        99.99674986985822,
                        100,
                        99.99343512952328,
                        100,
                        100,
                        100,
                        99.99348439400394,
                        100,
                        null,
                        null
                    ]
                },

 

 

and I am not able to transform it properly in power BI.
I attach the pbix file (the table I am interested in is "host_cpu_lab".

Can you show me please how to transform the data so as to be able to plot it in a line chart?

Thank you 






3 REPLIES 3
PowerBI88
Resolver I
Resolver I

In the end, I managed to achieve my goal by splitting the dataset in two parts and assigning and adding to each part an index column

Anonymous
Not applicable

Hi @PowerBI88 ,

Please try the following methods and check if they can solve your problem:

1.Expand the data column to rows in Power Query Editor.

 

2.Enter the following statement in the Advanced Editor.

 

let
    Source = Json.Document(File.Contents("C:\Users\v-huizhn\Downloads\generated.json")),
    #"Converted to Table" = Table.FromList(Source, Splitter.SplitByNothing(), null, null, ExtraValues.Error),
    #"Expanded Column1" = Table.ExpandRecordColumn(#"Converted to Table", "Column1", {"UserId", "id", "tipSecurableSet"}, {"Column1.UserId", "Column1.id", "Column1.tipSecurableSet"}),
    #"Expanded Column1.tipSecurableSet" = Table.ExpandRecordColumn(#"Expanded Column1", "Column1.tipSecurableSet", {"id", "Clients"}, {"Column1.tipSecurableSet.id", "Column1.tipSecurableSet.Clients"}),
    #"Expanded Column1.tipSecurableSet.Clients" = Table.ExpandListColumn(#"Expanded Column1.tipSecurableSet", "Column1.tipSecurableSet.Clients"),
    #"Expanded Column1.tipSecurableSet.Clients1" = Table.ExpandRecordColumn(#"Expanded Column1.tipSecurableSet.Clients", "Column1.tipSecurableSet.Clients", {"@odata.type", "typeId", "Entityids", "Clientid"}, {"Column1.tipSecurableSet.Clients.@odata.type", "Column1.tipSecurableSet.Clients.typeId", "Column1.tipSecurableSet.Clients.Entityids", "Column1.tipSecurableSet.Clients.Clientid"})
in
    #"Expanded Column1.tipSecurableSet.Clients1"

 

3.You can also view the following link to learn more about transform json data.

Solved: Converting JSON data into PowerBI table - Microsoft Fabric Community

Solved: Convert json List Record to Table value - Microsoft Fabric Community

4.Only the super user can attach the pbix files. You can use the following method to provide the sample data.

How to provide sample data in the Power BI Forum - Microsoft Fabric Community

 

 

Best Regards,

Wisdom Wu

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

 

 

 

 

 

PowerBI88
Resolver I
Resolver I

how can I attach the pbix file to my post?

Helpful resources

Announcements
May Power BI Update Carousel

Power BI Monthly Update - May 2026

Check out the May 2026 Power BI update to learn about new features.

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.