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

Good 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, without the need to apply filters, something like the average value of the last hour in real time.

In the following table I specify the following data:

Fr4ncoFerr3r_0-1648467473056.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-1648467598189.png

Those would be the expected values, but without having to apply filters.

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!!!

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

Hi @Syndicate_Admin ,

According to your description, I download your sample, here's my solution.

Create a measure.

Promedio_Nivel = 
CALCULATE (
    AVERAGE ( muestra[Nivel_1] ),
    FILTER (
        ALL ( 'muestra' ),
        HOUR ( 'muestra'[Fecha_Hora] )
            = MAXX ( ALL ( 'muestra' ), HOUR ( 'muestra'[Fecha_Hora] ) )
    )
)

Get the correct result without a slicer.

vkalyjmsft_0-1648871426852.png

I attach my sample below for reference.

 

Best Regards,
Community Support Team _ kalyj

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

View solution in original post

3 REPLIES 3
v-yanjiang-msft
Community Support
Community Support

Hi @Syndicate_Admin ,

According to your description, I download your sample, here's my solution.

Create a measure.

Promedio_Nivel = 
CALCULATE (
    AVERAGE ( muestra[Nivel_1] ),
    FILTER (
        ALL ( 'muestra' ),
        HOUR ( 'muestra'[Fecha_Hora] )
            = MAXX ( ALL ( 'muestra' ), HOUR ( 'muestra'[Fecha_Hora] ) )
    )
)

Get the correct result without a slicer.

vkalyjmsft_0-1648871426852.png

I attach my sample below for reference.

 

Best Regards,
Community Support Team _ kalyj

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

amitchandak
Super User
Super User

@Syndicate_Admin , if you have datetime column, you can create a measure like

 

calculate( Count(Table[Value]), filter(Table, Table[Datetime] >= now() -time(1,0,0) && Table[Datetime] < now() ) ) 

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Dear.

Thanks for the help. But it didn't work.

The expression

EXAMPLE =
CALCULATE(COUNT('f_ejemplo'[EJE3]), filter('f_ejemplo', 'f_ejemplo'[Fecha_Hora] >= now() -time(1,0,0) && 'f_ejemplo'[Fecha_Hora] < now() ))
It throws blank vlaroes at me.
Fr4ncoFerr3r_0-1648471300245.png

Nose if I should put the YTD.

I await comments. Best regards.

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!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

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.