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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Syndicate_Admin
Administrator
Administrator

Mostrar fechas como leyenda del gráfico

Hola

Tengo un informe que contiene una tabla de hechos y tablas de dos dimensiones (es decir, fecha y hora). Estoy trazando tres gráficos de líneas (para hoy, ayer y anteayer) que muestran la temperatura promedio durante 24 horas. A continuación se muestra un ejemplo:

Dunner2020_0-1657669125109.png

Calculé tres medidas para calcular la temperatura media. Por ejemplo: la medición de temperatura de hoy se ve de la siguiente manera:

Hoy = CALCULAR(PROMEDIO(Hecho[TEMPERATURA]),Fechas[Fecha]= HOY())

Ahora quiero cambiar la leyenda del gráfico con las fechas reales. Por ejemplo, en lugar de hoy, debería mostrar la fecha (es decir, 13/7/2022). No estoy seguro de cómo traer la fecha como una leyenda. Cualquier ayuda sería realmente apreciada. Gracias

3 REPLIES 3
Syndicate_Admin
Administrator
Administrator

@Dunner2020 , Basado en lo que obtuve. Necesitas una columna como esta y usarla como leyenda

Tipo de fecha = SWITCH(TRUE(),'Date'[Date]=TODAY(),"Today"
,'Fecha'[Fecha]=HOY()-1,"Ayer"
,'Date'[Date]=TODAY()-2,"Anteayer"
,'Fecha'[Fecha]&"")

@amitchandak , quiero mostrar las fechas como leyenda, no como texto. En lugar de mostrar Hoy, quiero mostrar la fecha de hoy

@Dunner2020 , los últimos tres días de datos

Compruebe si esta medida puede ayudar

oday = CALCULATE(AVERAGE(Fact[TEMPERATURE]),filter(Dates, Dates[Date]>= TODAY()-2 && Dates[Date]<= TODAY()) )

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

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.