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
Gracias por leer.
Estoy tratando de crear una medida utilizando SUMX. Quiero calcular en el nivel de fila un ratio * importe en dólares y resumirlo.
Los datos están en un formato similar a lo que hay a continuación, pero debido a la política de la empresa no creo que pueda publicar datos reales.
Fecha | Producto | Vendido | Total de dólares vendidos |
201901 | A | 10 | 1000 |
201901 | B | 16 | 1200 |
202001 | A | 12 | 1400 |
202001 | B | 16 | 1200 |
La medida final es algo así como
FinalMeasure = SUMX(SalesTable, [PriceChange] * [Total Dollars Sold])
Creé una medida de precio--
Price = DIVIDE(SUM(Total Dollars Sold), SUM(Sold))
A continuación, la creación de un precio del año anterior--
PYPRICE = CALCULATE([Price], SAMEPERIODLASTYEAR('YearMonthBridge'[Date]))
A continuación, una medida de cambio de precio tomando el cociente de las dos medidas anteriores.
Mientras solucionaba mi medida SUMX comencé a SUMX cada parte de la medida para determinar dónde estaba el problema. Cuando hice un SUMX de la medida PY--
SUMXPY = SUMX(SalesTable,PYPRICE)
El valor devuelto siempre es nothing/null. Todos los otros SUMX (PRICE) etc... están funcionando correctamente.
Editar-- También debería añadir. La medida PRECIO DE PY funciona correctamente por sí misma, ya que mi columna Fecha está conectada a una tabla de fechas.
¿Es posible utilizar SUMX con Time Intelligence? Estoy teniendo un tiempo difícil envolver mi cabeza alrededor de this!! Cualquier ayuda sería apreciada.
Gracias por leer
Solved! Go to Solution.
¡Resuelto con esta respuesta! ¡Gracias a todos!
¡Resuelto con esta respuesta! ¡Gracias a todos!
@victorq, no muy claro. Pero usted debe utilizar una tabla de fechas para la inteligencia de tiempo
Ejemplo
PYPRICE ? CALCULATE([Price], SAMEPERIODLASTYEAR('Date'[Date]))
PYPRICE á CALCULATE([Price], dateadd('Date'[Date],-1,year))
Consulte mi video sobre por qué la inteligencia de tiempo puede fallar
Power BI — Año tras año con o sin inteligencia de tiempo
https://medium.com/@amitchandak.1978/power-bi-ytd-questions-time-intelligence-1-5-e3174b39f38a
https://www.youtube.com/watch?v=km41KfM_0uA
Power BI — Mes a mes con o sin inteligencia de tiempo
https://medium.com/@amitchandak.1978/power-bi-mtd-questions-time-intelligence-3-5-64b0b4a4090e
https://www.youtube.com/watch?v=6LUBbvcxtKA
@victorq parece que lo estás haciendo súper complicado. ¿Cuál es tu objetivo final?
Lee este post para obtener tu respuesta rápidamente.
https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490...
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.
@parry2k Disculpas, creo que lo resolví esta mañana así que debería ser capaz de encapsular el problema.
Esta medida siguiente devuelve null:
PriceChange = SUMX(Sales Table, Divide([Price], CALCULATE([Price], SAMEPERIODLASTYEAR(YearMonthBridge[Date]))))
Cuando esta medida parece estar funcionando y produciendo el resultado esperado. ¿Para mí son los mismos?
PriceChange =
Var Pricechange = Divide([Price], CALCULATE([Price], SAMEPERIODLASTYEAR(YearMonthBridge[Date])))
return SUMX(Sales Table, Pricechange)
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 |
---|---|
1 | |
1 | |
1 | |
1 | |
1 |
User | Count |
---|---|
2 | |
2 | |
1 | |
1 | |
1 |