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 POWER BI Team,
Necesito tu ayuda y haré todo lo posible para ser claro.
Mi conjunto de datos tiene tres columnas principales CLIENT, DATE (Text) y ORDER(Numeric). Cuando dejo caer la columna en un MATRIX, esto es lo que obtengo:
Usando DAY como filtro, voy a comparar un DÍA a la vez con HOY. Me gustaría poder calcular la diferencia y el porcentaje de diferencia en EL ORDEN entre el valor de hoy y el valor del lunes y para que la medida se actualice cuando selecciono cualquier otro día de la semana. Siempre voy a comparar cualquier DIA con HOY.
Aquí el resultado deseado:
¿Hay alguna manera de lograr esto usando DAX tal vez? En caso afirmativo, ¿puede alguien ayudarme a alcanzar el resultado deseado?
Gracias de antemano.
@corange , ¿Puede compartir datos de ejemplo y salida de ejemplo en formato de tabla?
ver si estos dos pueden traer algo de ayuda
Power BI — Preguntas WTD— Inteligencia de tiempo 4–5
https://medium.com/@amitchandak.1978/power-bi-wtd-questions-time-intelligence-4-5-98c30fab69d3
Power BI — Preguntas de inteligencia diurna — Time Intelligence 5–5
https://medium.com/@amitchandak.1978/power-bi-day-intelligence-questions-time-intelligence-5-5c3243d...
Hola amitchandak ,
Aquí mi muestra: https://1drv.ms/u/s!AiS7XVNuQsBCbslVeWs3M66_7po?e=C3CSAB
Aquí una tabla de lo que me gustaría lograr:
Etiquetas de fila | Lunes | Hoy | Diferencia | % | Etiquetas de fila | Martes | Hoy | Diferencia | % | |
Cliente 1 | 1 | -1 | -100% | Cliente 1 | 1 | -1 | -100% | |||
Cliente 13 | 1 | 1 | 0 | 0% | Cliente 11 | 4 | -4 | -100% | ||
Cliente 15 | 1 | -1 | -100% | Cliente 13 | 1 | 1 | 0 | 0% | ||
Cliente 3 | 1 | -1 | -100% | Cliente 14 | 1 | -1 | -100% | |||
Cliente 4 | 4 | -4 | -100% | Cliente 2 | 1 | -1 | -100% | |||
Cliente 5 | 1.25 | 2 | 0.75 | 60% | Cliente 4 | 2.25 | -2.25 | -100% | ||
Cliente 7 | 2.67 | 5.00 | 2.33 | 87% | Cliente 5 | 2 | 2 | 0 | 0% | |
Cliente 8 | 1 | -1 | -100% | Cliente 6 | 1 | -1 | -100% | |||
Cliente 9 | 1 | -1 | -100% | Cliente 7 | 1 | 5 | 4 | 400% | ||
Cliente 8 | 2 | -2 | -100% |
hola @corange
Pruebe de esta manera como se indica a continuación:
Paso 1:
Agregue una columna BookingDayNo en la tabla.
Step2:
Cree dos medidas como se indica a continuación:
Difference =
var _firstday=CALCULATE(MIN('Table'[BookingDayNo]),ALLSELECTED('Table'))
var _lastday=CALCULATE(MAX('Table'[BookingDayNo]),ALLSELECTED('Table'))
return
CALCULATE(SUM('Table'[OrderNumber]),FILTER(ALL('Table'[BookingDayName],'Table'[BookingDayNo]),'Table'[BookingDayNo]=_lastday))-CALCULATE(SUM('Table'[OrderNumber]),FILTER(ALL('Table'[BookingDayName],'Table'[BookingDayNo]),'Table'[BookingDayNo]=_firstday))
% =
var _firstday=CALCULATE(MIN('Table'[BookingDayNo]),ALLSELECTED('Table'))
var _lastday=CALCULATE(MAX('Table'[BookingDayNo]),ALLSELECTED('Table'))
return
DIVIDE(CALCULATE(SUM('Table'[OrderNumber]),FILTER(ALL('Table'[BookingDayName],'Table'[BookingDayNo]),'Table'[BookingDayNo]=_lastday))-CALCULATE(SUM('Table'[OrderNumber]),FILTER(ALL('Table'[BookingDayName],'Table'[BookingDayNo]),'Table'[BookingDayNo]=_firstday)),CALCULATE(SUM('Table'[OrderNumber]),FILTER(ALL('Table'[BookingDayName],'Table'[BookingDayNo]),'Table'[BookingDayNo]=_firstday)))
Resultado:
Por cierto, no podría lograr que agregar columna personalizada al final de la matriz visual, por lo que es mejor ponerlos en dos objetos visuales
saludos
Lin
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 | |
2 | |
2 | |
2 | |
1 |