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
Jayana
Frequent Visitor

Maximum and minimum of average on a selected date(s)

Hi All,

 

I'm in my first week with PowerBI and need some help.

I'm working with data at minutely intervals comes from many sensors and trying to

determine maximum/minimum values for a selected date(s). The data looks like below:

 

Original data

Date_time                               Sensor1   Sensor 2 ...

01/01/2017T12:00:00+10:00       28.1          18.7

01/01/2017T12:00:01+10:00       25.7          15.6

01/01/2017T12:00:02+10:00       25.6          18.5

 

Then I pivoted it in Power BI to

Date_time                                    Sensor     Measure

01/01/2017T12:00:00+10:00       Sensor1    28.1

01/01/2017T12:00:00+10:00       Sensor2    18.7

01/01/2017T12:00:01+10:00       Sensor1    25.7

01/01/2017T12:00:01+10:00       Sensor2    15.6

01/01/2017T12:00:02+10:00       Sensor1    25.6

01/01/2017T12:00:02+10:00       Sensor2    18.5

 

Then I grouped them, using group function in Power BI, into groups,

let's say Sensor1 and Sensor2 together for the above data. I managed to

create a graph out of average between those two sensors however when

I used Card to determine maximum/minimum value for a date(s) that I selected, 

I got the maximum/minimum of individual sensor not the maximum/minimum of

average of the two sensors. For the above data, I got 28.1 but I wanted to get 23.4

 for 1/01/2017, which is max of average between Sensor1 and Sensor2 (28.1+18.7)/2.

 

Any advice how I can achieve this (maximum or minimum)? This should be filtered to

date(s) selelected by users.

 

Thanks in advance for any help.

 

Regards

Jayana

1 ACCEPTED SOLUTION
Ashish_Mathur
Super User
Super User

Hi,

 

You may refer to my solution here.

 

Hope this helps.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

View solution in original post

4 REPLIES 4
Ashish_Mathur
Super User
Super User

Hi,

 

You may refer to my solution here.

 

Hope this helps.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Hi Ashish,

 

Brilliant, it works like magic.

 

Thanks for your help.

 

Jayana

You are most welcome.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
Jayana
Frequent Visitor

Any help please.

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.