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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Calculate the difference of some filtered row in a new column

Hello Community,

I'm stuck with a creation of a formula to calculate the difference between the rangeof some value (2- or 4 row), we talking of a statistic production data.

I find only reference to find range of data, but not for calculate value.

 

the starting table is an excel file,  elaborated to a matrix table, with Avarage, std. deviation, and this value that must be calculated from Max and Min value of a range of value.

 

- Every HEAD have 2,3, or 4 sample, it depend of Measure name group .
- I need to find the range from max and min value for each group of measure.

 

Here the start table listed

 

Date and TimeHR.OperatorLine NameHeadSmp2Low LimitHigh LimitReading
06/08/202009:50:00OPERATORED15Flangia115,86,256,04
06/08/202009:50:00OPERATORED15Flangia125,86,256,08
06/08/202009:50:00OPERATORED15Flangia135,86,256,02
06/08/202009:50:00OPERATORED15Flangia145,86,255,97
06/08/202009:50:00OPERATORED15Flangia215,86,256,01
06/08/202009:50:00OPERATORED15Flangia225,86,256,00
06/08/202009:50:00OPERATORED15Flangia235,86,256,03
06/08/202009:50:00OPERATORED15Flangia245,86,256,04

 

elaboratin matrix table

 

PRESSMEASUREDATEHEADMIN+/-AVGMAXDIFF (RANGE)
D15Flangia06/08/2020 00:00         1 5,80  0,046,036,25 X 
D15Flangia06/08/2020 00:00         2  5,80  0,026,026,25 X 

 

 

and the report that I try to realize (TESTA, will be the  RANGE field).

table PowerBi.JPG

 

I hope to have add sufficient information, 

thanks in advance...

 

Alex

 

 

----------------------------

EDIT:  

is it correct this formula syntax? it seem give me the correct value.

Max of Misure minus Min of Misure =MAX('OT'[Misure]) - MIN('OT'[Misure])

 

1 ACCEPTED SOLUTION
v-yingjl
Community Support
Community Support

Hi @Anonymous ,

Sorry for replying late. Based on your description and compared with the start table, matrix table and the matrix table which is in the picture, if you just want to calculate the diff between the max value and the min value for fields, the formula you edited in your post is correct.

Here is the sample based on your start table:

LOW = MIN('Table'[Low Limit])
MAX = MAX('Table'[High Limit])
Diff = [MAX] - [LOW]

matrix.png

 

Best Regards,
Community Support Team _ Yingjie Li
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
Anonymous
Not applicable

Thanks for your inerest, and other way to formatting the variables.

Kind Regards

 

v-yingjl
Community Support
Community Support

Hi @Anonymous ,

Sorry for replying late. Based on your description and compared with the start table, matrix table and the matrix table which is in the picture, if you just want to calculate the diff between the max value and the min value for fields, the formula you edited in your post is correct.

Here is the sample based on your start table:

LOW = MIN('Table'[Low Limit])
MAX = MAX('Table'[High Limit])
Diff = [MAX] - [LOW]

matrix.png

 

Best Regards,
Community Support Team _ Yingjie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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