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.
Hola, tengo una medida llamada "Puntuación Media" - PROMEDIO('Tabla'[Puntuación]).
¿Cuál sería el DAX para el actual, 90 días y YTD para esta medida?
¡Gracias!
@ayeoh Como práctica recomendada, agregue la dimensión de fecha en el modelo y utilelo para los cálculos de inteligencia de tiempo y tiempo. Una vez agregada la dimensión de fecha, márquela como una tabla de fechas en las herramientas de tabla.
https://perytus.com/2020/05/22/create-a-basic-date-table-in-your-data-model-for-time-intelligence-ca...
Y desde aquí puede utilizar Datesinperiod durante 90 días, función DatesYTD para la función YTD y DatesMTD para el mes actual.
Me gustaría❤ elogiossi mi solución ayudara.👉Si puedes pasar tiempo publicando la pregunta, también puedes hacer esfuerzos para dar a Kudos quien haya ayudado a resolver tu problema. ¡Es una muestra de agradecimiento!
⚡Visítenos enhttps://perytus.com, su ventanilla única para proyectos/formación/consulta relacionados con Power BI.⚡
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.
¿Qué pasa para la fecha ACTUAL? por ejemplo, si abro el panel de control de PBI hoy, 6/16/2020, entonces las medidas deberían mostrar los datos a partir del 6/16/2020? Gracias.
@ayeoh entonces puede utilizar la función TODAY()
Today Avg =
CALCULATE ( AVERGAE ( Table[Column] ), DateTable[Date] = TODAY() ) )
Me gustaría❤ elogiossi mi solución ayudara.👉Si puedes pasar tiempo publicando la pregunta, también puedes hacer esfuerzos para dar a Kudos quien haya ayudado a resolver tu problema. ¡Es una muestra de agradecimiento!
⚡Visítenos enhttps://perytus.com, su ventanilla única para proyectos/formación/consulta relacionados con Power BI.⚡
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.
Hola, lo siento mucho, pero me di cuenta de que no hay datos para hoy. De hecho, los últimos datos reportados fueron hace más de un mes. Las críticas se realizan según sea necesario, no todos los días. Entonces, ¿qué pasa si no sé cuál fue la última fecha de revisión (es decir, cuál fue la fecha más reciente cuando los datos estaban disponibles), ¿cuál debería ser el DAX? ¡Muchas gracias!
@ayeoh puede ser probar algo como esto
Last Date =
VAR __mostRecentDate = CALCULATE ( MAX ( Table[Date] ), ALL ( Table ) )
RETURN
CALCULATE ( AVERAGE( Table[Value] ), DateTable[Date] = __mostRecentDate )
Me gustaría❤ elogiossi mi solución ayudara.👉Si puedes pasar tiempo publicando la pregunta, también puedes hacer esfuerzos para dar a Kudos quien haya ayudado a resolver tu problema. ¡Es una muestra de agradecimiento!
⚡Visítenos enhttps://perytus.com, su ventanilla única para proyectos/formación/consulta relacionados con Power BI.⚡
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.
Lo siento por ser un dolor, pero también investibé en línea, y creo que debería estar usando la función LASTNONBLANK.
Pero no estoy seguro de cómo utilizar LASTNONBLANK en una expresión DAX.
¿Puedes ayudar? Gracias.
Aquí está Lastnoblank, pero supongo que también podría utilizar LastDate o Max(Date). Y ver DATESYTD. Algo así como:
lastdate = CALCULATE(AVERAGE('Table'[Score]),LASTDATE('Table'[Date]))
last 90 days = CALCULATE(AVERAGE('Table'[Score]),FITER(ALL('Table'),'Table'[Date]>=MAX('Table'[Date])-90 && 'Table'[Date]<=MAX('Table'[Date])
YTD = CALCULATE(AVERAGE('Table'[Score]), DATESYTD('Table'[Date]))
Paul Zheng _ Equipo de apoyo de la comunidad
Si este post ayuda, entonces considera Aceptarlo como la solución para ayudar a los otros miembros a encontrarlo más rápidamente.
Estas son las medidas de nuevo (alternativas):
Desplazamiento de fecha : DATEDIFF(TODAY(), 'DimDate'[date], DAY) *this is a calculated column
Puntuación Media - PROMEDIO(Puntuación)
Puntuación Media (Last90Days) - CALCULATE([Average Score], ALL('DimDate'[date]), 'DimDate'[Fecha de desplazamiento]>-90)
Puntuación Media (YTD) - CALCULATE([Average Score], ALL('DimDate'[date]), 'DimDate'[year]-YEAR(TODAY()))
Pero, cuando visualizo estas medidas en un gráfico de barras - mi objetivo es mostrar estas 3 medidas como 3 barras en un gráfico de barras - no importa qué fecha elija en la segmentación de fecha, Puntuación media siempre es - Puntuación media (Last90Days) - ¿Por qué? y la puntuación media (YTD) siempre está en blanco - ¿Por qué?
Muchas gracias.
Hola Paul, gracias. Las medidas son sintácticamente correctas - no se ha producido un error. Pero los resultados están en blanco.
Tengo una pregunta: ¿qué pasa si las fechas de revisión son esporádicas, por ejemplo, hay una en 4/1, luego la siguiente si 4/16, luego 4/21, etc.
Por lo tanto, si el usuario de PBI selecciona 4/21 fecha de revisión en el selector de fecha, debe mostrar la puntuación 4/21, y luego la puntuación promedio para los últimos 90 días contando de 4/21, y luego la puntuación promedio YTD para el período 1/1-4/21/20.
¿Es eso lo que hacen estas medidas (que usted proporcionó)?
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
2 | |
1 | |
1 | |
1 | |
1 |