Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
buenos días,
Estoy intentando crear una media ponderada de los cinco registros anteriores a uno dado, para ello, he creado una columna:
Hi @BLM24 ,
You are creating a calculated column and not a measure, the value of the calculated column does not change dynamically. Each time you change the value in the slicer, you need to refresh the visual object in order for the calculated column to update its value.
If you want to realize that a change in the value of slicer is immediately followed by a change in the value of Media Column Ud, then you can only use measure to achieve this. Please provide some sample data and expected results, it is hard for DAX alone to correctly modify it for you.
Best Regards,
Dino Tao
Hola @BLM24 ,
¿Puedes usar ALLSELECTED en lugar de ALL? Por ejemplo,
ALLSELECT(Costos)
Se esta publicação ajudar, considere aceitá-la como solução e kudos para ajudar os outros membros a encontrá-la mais rapidamente.
Kind Regards,
Gökberk Uzuntaş
📌 If this post helps, then please consider Accepting it as a solution and giving Kudos — it helps other members find answers faster!
🔗 Stay Connected:
📘 Medium |
📺 YouTube |
💼 LinkedIn |
📷 Instagram |
🐦 X |
👽 Reddit |
🌐 Website |
🎵 TikTok |
@BLM24 , Try using below DAX
Media Column Ud =
VAR prod = Costs[product]
VAR fabdate = Costs[Fab.Date]
VAR average = CALCULATE(
DIVIDE(
SUMX(Costes, Costes[Broth / Unit] * Costes[Manufactured Units]),
SUM(Costes[Manufactured Units])
),
TOPN(
5,
FILTER(
ALLSELECTED(Costes),
Costes[product] = prod && DATEDIFF(Costes[Manufacturing Date], fabdate, DAY) >= 0
),
Costes[Manufacturing Date], DESC
)
)
RETURN average
Proud to be a Super User! |
|
Gracias,
he usado ALLSELECTED(Costes), pero el resultado es exactamente el mismo, no cambia el valor
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
| User | Count |
|---|---|
| 98 | |
| 72 | |
| 50 | |
| 50 | |
| 43 |