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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
Anonymous
Not applicable

Correlatividad de Asientos

Buenas tardes, estaria precisando obtener un filtro que me permita identificar la correlatividad de los asientos.

Caso propuesto: Cuento con asientos contables  el cual son de 900 registros aproximadamente, debo realizar en PBI una manera donde pueda visualizar/obtener o identificar aquellos asientos que tuvieron saltos.

 

1001

1002

1003

1005 Excepción, salto 1 asiento.

1006

1009 Excepción, salto 2 asientos.

 

Seria como la función GAPS en ACL

 

1 ACCEPTED SOLUTION
v-frfei-msft
Community Support
Community Support

Hi @Anonymous ,

 

We can create a measure as below to work on it.

Measure = 
VAR currentindex =
    MAX ( 'Table'[Index] )
VAR lastindex =
    CALCULATE (
        MAX ( 'Table'[Index] ),
        FILTER ( ALLSELECTED ( 'Table' ), 'Table'[Index] < currentindex )
    )
VAR diff = currentindex - lastindex
RETURN
    IF ( diff = 1, BLANK (), "Excepción, salto " & diff & " asientos." )

Capture.PNG

 

Pbix as attached.

 

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.

View solution in original post

3 REPLIES 3
v-frfei-msft
Community Support
Community Support

Hi @Anonymous ,

 

We can create a measure as below to work on it.

Measure = 
VAR currentindex =
    MAX ( 'Table'[Index] )
VAR lastindex =
    CALCULATE (
        MAX ( 'Table'[Index] ),
        FILTER ( ALLSELECTED ( 'Table' ), 'Table'[Index] < currentindex )
    )
VAR diff = currentindex - lastindex
RETURN
    IF ( diff = 1, BLANK (), "Excepción, salto " & diff & " asientos." )

Capture.PNG

 

Pbix as attached.

 

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.
Anonymous
Not applicable

Muchisimas gracias! para que me funcione tuve que eliminar el MAX del currentindex

 

La forma correcta seria sacar el MAX en el currentindex, o si no, estaria tomando el ultimo valor. Ejemplo: si se cuenta con 190 registros, tomaria el registro 190 como mayor.

 

Measure = VAR currentindex = ( Sheet1[index] ) VAR lastindex = CALCULATE ( MAX ( Sheet1[index] ); FILTER ( ALLSELECTED (Sheet1); Sheet1[index] < currentindex ) ) VAR diff = currentindex - lastindex RETURN IF ( diff = 1; BLANK (); "Excepción, salto " & diff & " asientos." )
kentyler
Solution Sage
Solution Sage

en el power query, anyde una columna index
en una medida agara el numero corriente

sustrae 1 del indice corriente and usa  LookupValue() para agarrar el numero del recorde precediente
si el diferencia entre los dos numeros is mas que 1, esto da el numero de "saltos"
si quiere hacer un screen-share sobre la problem, me habla

 





Did this post answer your question? Mark it as a solution so others can find it!

Help when you know. Ask when you don't!




Join the conversation at We Talk BI find out more about me at Slow BI


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.

Power BI Carousel June 2024

Power BI Monthly Update - June 2024

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

PBI_Carousel_NL_June

Fabric Community Update - June 2024

Get the latest Fabric updates from Build 2024, key Skills Challenge voucher deadlines, top blogs, forum posts, and product ideas.

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

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

Top Solution Authors