Forum Discussion

Jond's avatar
Jond
Regular Visitor
6 years ago

Obtain maximum value (envelope)

Hello,

 

I have some data visualized in Power Bi using R scripts (ggplot2 library). Field data (two variables, y as a function of x, black points) and two constant theoretical curves (red).

Data from several days

In order to compare the field data with the theoretical curves, I would like to obtain the maximum and minimum y values per x value per day. For example:

Day 1

Day 2

The objective is to obtain "envelope" curves, get rid of the rest of data and compare them in one visual respect to the theoretical curves. 

 

Any ideas? How can I obtain the values in R script or in the query?

 

Thanks

2 Replies

  • v-yuta-msft's avatar
    v-yuta-msft
    Community Support

    Jond ,

     

    I think you can use dax instead, could you share the sample data and the output result?

     

    Regards,

    Jimmy Tao