Forum Discussion
Syndicate_Admin
4 years agoAdministrator
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 sho...
- 4 years ago
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.
I attach my sample below for reference.
Best Regards,
Community Support Team _ kalyjIf this post helps, then please considerAccept it as the solution to help the other members find it more quickly.
amitchandak
4 years agoSuper 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() ) )
Syndicate_Admin
4 years agoAdministrator
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.
Nose if I should put the YTD.
I await comments. Best regards.