Don't miss your chance to take the Fabric Data Engineer (DP-700) exam on us!
Learn moreWe've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register 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
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 55 | |
| 37 | |
| 34 | |
| 19 | |
| 17 |
| User | Count |
|---|---|
| 73 | |
| 70 | |
| 37 | |
| 35 | |
| 26 |