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
Syndicate_Admin
Administrator
Administrator

Acentuar un período que es más largo que 10 días y superior a 15 grados

Hola

En el escenario de abajo tengo una columna de fecha y temperatura.

Lo que estamos tratando de visualizar es acentuar un período que es más largo que 10 días y superior a 15 grados. Como el ejemplo de Excel a continuación.

¿Quién puede ayudarme a visualizar esto?

Stefanve_0-1634895449853.png

Gracias

Stefan

1 ACCEPTED SOLUTION
Syndicate_Admin
Administrator
Administrator

Hola
pruebe esta medida:

Temperature_15_and_higher =
DÓNDE _cur_date = SELECTEDVALUE ( Temp[Fecha] )
DÓNDE _first_date_before_below_15 =
MAXX (
FILTRO (
TODO ( Temp ),
Temp[Fecha] <= _cur_date &&
Temp[Fecha] >= _cur_date - 9 &&
Temp[Temprature] < 15
),
Temp[Fecha]
)
DÓNDE _first_date_after_below_15 =
BRIBONA (
FILTRO (
TODO ( Temp ),
Temp[Fecha] >= _cur_date &&
Temp[Fecha] <= _cur_date + 9 &&
Temp[Temprature] < 15
),
Temp[Fecha]
)
DÓNDE _number_of_days =
SI ( ISBLANK ( _first_date_before_below_15 ), 10, INT(_cur_date - _first_date_before_below_15) ) +
SI ( ISBLANK ( _first_date_after_below_15 ), 10, INT(_first_date_after_below_15 - _cur_date) ) -
1
DEVOLUCIÓN
SI ( _number_of_days >= 10, SELECTEDVALUE(Temp[Temprature]), ESPACIO EN BLANCO() )


Podemos poner esta medida junto con el campo Temprature en la imagen. El resultado es el siguiente:

ikor42_0-1634908600659.png

View solution in original post

1 REPLY 1
Syndicate_Admin
Administrator
Administrator

Hola
pruebe esta medida:

Temperature_15_and_higher =
DÓNDE _cur_date = SELECTEDVALUE ( Temp[Fecha] )
DÓNDE _first_date_before_below_15 =
MAXX (
FILTRO (
TODO ( Temp ),
Temp[Fecha] <= _cur_date &&
Temp[Fecha] >= _cur_date - 9 &&
Temp[Temprature] < 15
),
Temp[Fecha]
)
DÓNDE _first_date_after_below_15 =
BRIBONA (
FILTRO (
TODO ( Temp ),
Temp[Fecha] >= _cur_date &&
Temp[Fecha] <= _cur_date + 9 &&
Temp[Temprature] < 15
),
Temp[Fecha]
)
DÓNDE _number_of_days =
SI ( ISBLANK ( _first_date_before_below_15 ), 10, INT(_cur_date - _first_date_before_below_15) ) +
SI ( ISBLANK ( _first_date_after_below_15 ), 10, INT(_first_date_after_below_15 - _cur_date) ) -
1
DEVOLUCIÓN
SI ( _number_of_days >= 10, SELECTEDVALUE(Temp[Temprature]), ESPACIO EN BLANCO() )


Podemos poner esta medida junto con el campo Temprature en la imagen. El resultado es el siguiente:

ikor42_0-1634908600659.png

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.