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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Syndicate_Admin
Administrator
Administrator

undefined

Community!!!!

I am trying to create a MEASURE or COLUMN to display on a card the average value of the last hour. I know, that in a table organizing the hierarchies of Date and Time I can show it. But I want to show the value directly on a card, kind of like the average value of the last hour in real time.

In the following table I specify the following data:

Fecha_Hora

EJE1

EJE2

EJE3

05/12/2021 10:00

66,5

109,5

1,5

05/12/2021 10:15

74,5

111,9

1,7

05/12/2021 10:30

77,0

112,3

1,9

05/12/2021 10:45

79,6

113,8

2,1

05/12/2021 11:00

81,0

114,4

2,5

05/12/2021 11:15

79,8

113,9

2,1

05/12/2021 11:30

76,8

111,9

1,9

05/12/2021 11:45

81,8

114,9

2,0

05/12/2021 12:00

83,1

116,1

2,3

05/12/2021 12:15

82,0

115,6

2,5

05/12/2021 12:30

81,0

114,3

2,7

05/12/2021 12:45

82,5

116,7

3,0

I need to calculate the average value of the last hour of the AXES, evaluating the last four of registration during the last hour.

I tried creating an AVERANGE measurement but I can't show only the average value of the last hour, I don't know if I should create a table where those values are hosted and then visualize them directly with SELECTDVALUES and LASTNOTBLANK.

Prom value. Ultima Hs = AVERANGE('GeneralTable'[AXIS1])

The expected value I'm wanting to get is

Prom value. Last Hs = 82.15

What can I do to resolve this conflict.

Thank you.

2 REPLIES 2
Syndicate_Admin
Administrator
Administrator

Not bad! thanks for the comment.

I am trying to create a MEASURE or COLUMN to display on a card the average value of the last hour. I know, that in a table organizing the hierarchies of Date and Time I can show it. But I want to show the value directly on a card, without the need to apply filters, something like the average value of the last hour in real time.

In the following table, specify the following data:

Fr4ncoFerr3r_0-1648469423320.png

Apply an averange and I arrive at the expected result by applying from a filter panel the selection of the date and time. But the idea is that by default and without applying filters the card can show me the values.

Fr4ncoFerr3r_1-1648469423172.png

The values shown on the card are the ones I want to get to, but I hope to visualize them directly without having to apply filters. I want to show those same values directly on the card.

Currently I am only applying an AVERANGE, but I do not know how to specify that I calculate the last minute value. Taking as a sample the four registers hs.

Prom EJE3 = CALCULATE ( AVERAGE ( 'f_ejemplo'[EJE3] ))
I leave the pbix file so they can look at the data and measurements.
Best regards!
I await your comments.
Best regards!!!
TomMartens
Super User
Super User

Hey @Syndicate_Admin ,

 

please consider creating a pbix file that contains sample data, upload the pbix file to onedrive or dropbox and share the link, as the data you provided can not be pasted to a table in Power BI desktop.

Nevertheless, I would create some calculated columns

  • the first contains only the date
  • the 2nd only the hour of the time part
  • the 3rd contains a check, that flags the rows where the date and the hour mark are the max value

Finally, create a measure that aggregates the values.

 

As I do not fully understand how you calculate the sample value 82.15, please describe how this value is calculated meaning describe the values that are used for the calculation.

 

Regards,

Tom



Did I answer your question? Mark my post as a solution, this will help others!

Proud to be a Super User!
I accept Kudos 😉
Hamburg, Germany

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.