Get certified for free when you join Fabric Data Days 2026 and dive into Fabric, Power BI, SQL, AI, and other essential data skills.
Join nowData Days is here! Join us now for 60+ days of learning, challenges, and connection. Learn more
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
Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.
Check out the May 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 23 | |
| 23 | |
| 21 | |
| 20 | |
| 15 |
| User | Count |
|---|---|
| 58 | |
| 55 | |
| 43 | |
| 30 | |
| 24 |