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

EQUIVALENTE EN PBI ciclo For VBA

Buenas tardes Soy nuevo usando PBI Estoy tratando de realizar un proyecto de cálculo para 40 años Tengo 8 tablas diferentes Cuando se desarrolla en excel se aplico macros usando un ciclo para el cual me permite realizar el cálculo de forma repetitivas, con este ciclo se puede ir incrementando las columnas y las filas. En POWER BI no cuento con ninguna función que me permita realizar este tipo de incremento: Años persona para evaluar en el año 1 es de 40 años el resualtado venta de la condición que es edad es igual a la tabla p donde se encierra el valor se selección mediante condición y función relacionada.para el año 2 se crea una variable para incrmetar los 40 años es decir que para la evaluación del año 2 la peresona tiene 41 años se realiza la misma función utilizando la variable de años incrmentada (41 años) para una segunda columna pero cuando se realiza la busqueda del valor no me trae el valor correspondiente para evaluar los 41 años me devulve el valor de los 40 años esto se debe a que no e evalúa la función que me permite realizar la búsqueda en la columna y me traiga el valor de la fila que corresponde a 41. En excel atrves del ciclo para el me relaza la función de forma repetitiva e incrementa automáticamente la búsqueda en la columna y fila de la tabla. Agradezco el apoyo que me brinde si necesita en POWER BI una función que sea equivalente a un ciclo para (vba). saludosEn excel atrves del ciclo para El relaza la función de forma repetitiva e incrementa automáticamente la búsqueda en la columna y fila de la tabla. Agradezco el apoyo que me brinde si necesita en POWER BI una función que sea equivalente a un ciclo para (vba). saludos En excel atrves del ciclo para El relaza la función de forma repetitiva e incrementa automáticamente la búsqueda en la columna y fila de la tabla. Agradezco el apoyo que me brinde si necesita en POWER BI una función que sea equivalente a un ciclo para (vba). saludos

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

Hi @HECTOR ,

 

You also could take a look at this blog: Creating Loops/Iterations In Power Query. It don't match your requirement totally. Hope you could get a few ideas from it.

 

And you could vote up the idea to make Power BI support VBA.

VBA for Power BI Desktop 

 

 

Best Regards,
Xue Ding
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
v-xuding-msft
Community Support
Community Support

Hi @HECTOR ,

 

Do the answers make sense? If they are helpful, please accept as solutions. If you have other good ideas, please share to us. More people will benefit from this thread.

 

Best Regards,
Xue Ding
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
v-xuding-msft
Community Support
Community Support

Hi @HECTOR ,

 

You also could take a look at this blog: Creating Loops/Iterations In Power Query. It don't match your requirement totally. Hope you could get a few ideas from it.

 

And you could vote up the idea to make Power BI support VBA.

VBA for Power BI Desktop 

 

 

Best Regards,
Xue Ding
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
lbendlin
Super User
Super User

Power Query does support recursive functions that you can use to recreate your Excel logic.

https://www.poweredsolutions.co/2019/07/01/recursive-functions-in-power-bi-power-query/

 

But if you show sample data and expected outcome there might be other suggestions on how to solve your issue.

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.