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

The Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.

Reply
MPrex
Regular Visitor

Scatterchart with TimeSeries Data and Field

My dataset has 5 columns: Time, T1, T2 (temperatures), P1 and P2 (pressures).

Time is a datatype Date/Time, while the others are decimals.

I would like to plot T1, T2, P1 and P2 on y axis and Time on x axis. 

From Modeling -> New Parameters -> Fields, I have created "X Parameters". This way I can select which one I want to plot in the report without having 4 different graphs.

 

MPrex_0-1736784828966.png

 

I am trying to create a scatter plot but I get this error:

MPrex_1-1736784934827.png

Does any of you have any idea of what I am missing? Is there anything wrong?

Thanks for the help! 

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

Hi @MPrex ,
According to your error message, you can dynamically display the data on the x-axis by creating a MEASURE using the aggregate function.

P1 Measure = SUM('Table'[P1])

Final output

vheqmsft_0-1736819111995.png

 

Best regards,
Albert He


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

5 REPLIES 5
v-heq-msft
Community Support
Community Support

Hi @MPrex ,
According to your error message, you can dynamically display the data on the x-axis by creating a MEASURE using the aggregate function.

P1 Measure = SUM('Table'[P1])

Final output

vheqmsft_0-1736819111995.png

 

Best regards,
Albert He


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

Hi @v-heq-msft 

Your solution works. 
Since in reality I have 100+ columns, I was wondering if I need to do this procedure "manually" for all of them. Is there a faster way?

Thanks!

Hi @MPrex ,
Batch creation of MEASURES with the same structure is not possible in the current version of power bi desktop. The fastest way is to create it manually and it is also better to use it in parameters. You can create as many measures as you need, which will reduce the number of measures you need to create.

 

Best regards,
Albert He


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

MPrex
Regular Visitor

Hi @timalbers !

Time is a Date/Time value. It is store in format YYYY-MM-DD HH:MM:SS 

The resolution of the dataset is 30 seconds: 2025-01-12 13:00:00, 2025-01-12 13:00:30 and so on.

I didn't select date hierarchy since there is no hour / minute resolution.

 

MPrex_1-1736787081938.png

 

 

 

timalbers
Super User
Super User

Hi @MPrex ,

just to make sure, what is the data type of the "Time" field?

It has to be numeric or a date hierarchy - otherwise it won't work as a x-axis property.


—————————————————————————————
If my answer helped you, please consider marking it as a solution.

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!

FebPBI_Carousel

Power BI Monthly Update - February 2025

Check out the February 2025 Power BI update to learn about new features.

Feb2025 NL Carousel

Fabric Community Update - February 2025

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