Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get inspired! Check out the entries from the Power BI DataViz World Championships preliminary rounds and give kudos to your favorites. View the vizzies.

Reply
KristofDM
Frequent Visitor

Evitar cálculos futuros en una medida

Hice una medida para calcular la eficiencia. Funciona bien, pero tan pronto como se añaden trimestres futuros a la sección de filtro del informe, la medida muestra 100 eficiencia (1) . ¿Hay alguna manera de evitar que se active la lógica en datos futuros que sea realmente inexistente?
A medida que empiezo la medida con 1-, el resultado es 1 si no se devuelve ningún dato.

cualquier idea sería muy apreciada! ps: De hecho, robé la fórmula de una hoja de Excel 🙂

PBIQUestion.jpg


testmeasure 1-(DIVIDE(
(SUMA
(tabla[xdays])
),
(SUMA
(tabla[Día de duración])
-SUM(TABLE[OtherDay])
)
)
)

3 REPLIES 3
amitchandak
Super User
Super User

@KristofDM, algo así

testmeasure CALCULATE(1-(DIVIDE(
(SUMA
(tabla[xdays])
),
(SUMA
(tabla[Día de duración])
-SUM(TABLE[OtherDay])
)
)
), date[date] <today())

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Greg_Deckler
Super User
Super User

@KristofDM -

Pruebe algo en la línea de:

testmeasure= 
VAR __measure = 
1-(DIVIDE(
  (SUM
   (table[xdays])
   ),
  (SUM
   (table[Durationday])
   -SUM(TABLE[OtherDay])
   )
  )
 )
RETURN
  IF(<some condition that identifies future>,BLANK(),__measure)


Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Power BI Cookbook Third Edition (Color)

DAX is easy, CALCULATE makes DAX hard...

gracias a todos por sus sugestions, el VAR __measure era de hecho lo que me faltaba!

gracias @Greg_Deckler

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code FABINSIDER for a $400 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

Check out the February 2025 Power BI update to learn about new features.

March2025 Carousel

Fabric Community Update - March 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors
Top Kudoed Authors