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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
Edisonsepulveda
New Member

Charting an Electrocardiogram from a single value

Hi All,

 

I'm trying to chart an Electrocardiogram from a  value that contains 2500 values separated by a space. My dataset looks like this:

Edisonsepulveda_0-1686035764995.png

I'm trying to create a chart with the numbers in the cell and a fixed X-axis value (let's say 2,000). My chart should look like this:

Edisonsepulveda_1-1686035904223.png

I have tried using split.text and Generate series in DAX, but since this is medical data, I want to make sure that if for some reason one data point doesn't have 2,500 points, that I don't mess up the whole thing. What could be the best way to create this graph?

 

Thanks!

1 ACCEPTED SOLUTION
v-yanjiang-msft
Community Support
Community Support

Hi @Edisonsepulveda ,

According to your description, here's my solution.

Sample:

vyanjiangmsft_0-1686212193873.png

1. Replace value in Power Query. For the Value column, replace space to "|".

vyanjiangmsft_1-1686212253482.png

2.Create a calculated column.

PathNo =
PATHLENGTH ( [Value] )

vyanjiangmsft_2-1686212348749.png

3.Create a new table.

Table 2 =
GENERATESERIES ( 1, MAX ( 'Table'[PathNo] ), 1 )

vyanjiangmsft_3-1686212450557.png

4.Create a measure.

Measure =
CONVERT (
    PATHITEM ( SELECTEDVALUE ( 'Table'[Value] ), MAX ( 'Table 2'[Row] ) ),
    INTEGER
)

Put Row column in X-axis and measure in Y-axis, get the correct result.

vyanjiangmsft_4-1686212549500.png

I attach my sample below for your reference.

 

Best Regards,
Community Support Team _ kalyj

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

View solution in original post

2 REPLIES 2
v-yanjiang-msft
Community Support
Community Support

Hi @Edisonsepulveda ,

According to your description, here's my solution.

Sample:

vyanjiangmsft_0-1686212193873.png

1. Replace value in Power Query. For the Value column, replace space to "|".

vyanjiangmsft_1-1686212253482.png

2.Create a calculated column.

PathNo =
PATHLENGTH ( [Value] )

vyanjiangmsft_2-1686212348749.png

3.Create a new table.

Table 2 =
GENERATESERIES ( 1, MAX ( 'Table'[PathNo] ), 1 )

vyanjiangmsft_3-1686212450557.png

4.Create a measure.

Measure =
CONVERT (
    PATHITEM ( SELECTEDVALUE ( 'Table'[Value] ), MAX ( 'Table 2'[Row] ) ),
    INTEGER
)

Put Row column in X-axis and measure in Y-axis, get the correct result.

vyanjiangmsft_4-1686212549500.png

I attach my sample below for your reference.

 

Best Regards,
Community Support Team _ kalyj

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

Thank you

 

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.