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

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register 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
November Carousel

Fabric Community Update - November 2024

Find out what's new and trending in the Fabric Community.

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

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! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

Check out the November 2024 Power BI update to learn about new features.