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

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.

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())

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)

@ 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!:
The Definitive Guide to Power Query (M)

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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