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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

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
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

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

Top Kudoed Authors