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
pras_hant10
Frequent Visitor

Necesita valores anteriores si los valores actuales son 0, debe comprobar hasta que encuentre el valor.

Problema:

DAX debe comprobar hasta que el valor anterior sea 0 (En valor), una vez que su valor no es 0, me da la fecha (Resultado necesario) como se indica a continuación.

DAX.jpg

3 ACCEPTED SOLUTIONS
az38
Community Champion
Community Champion

Hola @pras_hant10

tratar de una medida

Result =
var _curDate = MAX(Table[Date])
RETURN
CALCULATE(MAX(Table[Date]); FILTER(ALL(Table); Table[Date] <= _curDate && Table[InValue] <> 0))

do not hesitate to give a kudo to useful posts and mark solutions as solution
LinkedIn

View solution in original post

Syndicate_Admin
Administrator
Administrator

No @pras_hant10

probar una medida

Result =
var _curDate = MAX(Table[Date])
RETURN
CALCULATE(MAX(Table[Date]); FILTER(ALL(Table); Table[Date] <= _curDate && Table[InValue] <> 0))

View solution in original post

@pras_hant10

casi lo mismo

Result =
var _curDate = Table[Date]
RETURN
CALCULATE(MAX(Table[Date]); FILTER(ALL(Table); Table[Date] <= _curDate && Table[InValue] <> 0))

View solution in original post

9 REPLIES 9
Syndicate_Admin
Administrator
Administrator

No @pras_hant10

probar una medida

Result =
var _curDate = MAX(Table[Date])
RETURN
CALCULATE(MAX(Table[Date]); FILTER(ALL(Table); Table[Date] <= _curDate && Table[InValue] <> 0))

Gracias por su ayuda, por mis disculpas, estoy buscando la lógica para el campo columna.

@pras_hant10

casi lo mismo

Result =
var _curDate = Table[Date]
RETURN
CALCULATE(MAX(Table[Date]); FILTER(ALL(Table); Table[Date] <= _curDate && Table[InValue] <> 0))

Gracias. funciona

DAX.jpg

az38
Community Champion
Community Champion

Hola @pras_hant10

tratar de una medida

Result =
var _curDate = MAX(Table[Date])
RETURN
CALCULATE(MAX(Table[Date]); FILTER(ALL(Table); Table[Date] <= _curDate && Table[InValue] <> 0))

do not hesitate to give a kudo to useful posts and mark solutions as solution
LinkedIn
amitchandak
Super User
Super User

@pras_hant10 , Tratar como

if(Table[Invalue]-0,maxx(filter(Table, table[Date]<earlier(Table[Date])),Table[Date]),Table[Date])

Intenté lo mismo, pero el resultado de abajo que estoy recibiendo.

El resultado debe ser 01/02/2020 desde la fila 2a hasta la última, ya que hay 0 in valor.

DAX.jpg

@pras_hant10 ,

Tratar

if(Table[Invalue]-0,maxx(filter(Table, table[Date]<earlier(Table[Date]) && Table[Invalue]-0),Table[Date]),Table[Date])

az38
Community Champion
Community Champion

Hola @pras_hant10

tratar de una medida

Result =
var _curDate = MAX(Table[Date])
RETURN
CALCULATE(MAX(Table[Date]); FILTER(ALL(Table); Table[Date] <= _curDate && Table[InValue] <> 0))

do not hesitate to give a kudo to useful posts and mark solutions as solution
LinkedIn

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.