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
RF9809zpf
New Member

crear nueva tabla

Hola comunidad:

 

Necesito de su ayuda. Tengo dos tablas, una con datos llamada "ACTUAL" y otra con datos llamado "PRESUPUESTO". En ambas tablas tengo columnas de meses, cuentaS y montos. Tambien hay un campo que se llama version, en la tabla actual esta columna tiene en cada celda "Actual". En la tabla "PRESUPUESTO", la columna version, por ejemplo si es Marzo, se llama V03 y contiene desde marzo a Diciembre, la version 04 de abril a diciembre y asi sucesivamente.

Necesito armar una tabla que contenga los datos del año completo. Mi idea es tener en un informe un filtro donde se seleccione un mes, por ejemplo Abril.

Si selecciono Abril, la nueva tabla deberia traer los datos de enero a abril de la tabla "REAL" y los datos de mayo a diciembre de la tabla "PRESUPUESTO"

 

Les agradaceria mucho su ayuda

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

Hi @RF9809zpf ,

 

To create a table that contains the data for the entire year, you can use Power Query to filter the data from the "CURRENT" table for the months from January to the selected month, and filter the data from the "BUDGET" table for the months from the selected month to December.

To filter the data from the "CURRENT" table, you can use the "Filter Rows" transformation to keep only the rows where the "version" column contains the text "Current". To filter the data from the "BUDGET" table, you can use the "Filter Rows" transformation to keep only the rows where the "version" column contains the corresponding version for the selected month (e.g. "V04" for April) or a later version.

After filtering the data from both tables, you can use the "Append Queries" transformation to combine the two tables into a single table. And make sure that the data types of the columns and the names of the column headers should be consistent. For specific explanations, see the following example and Note.

vstephenmsft_1-1686624590784.png

Reference:

Append queries - Power Query | Microsoft Learn

 

   

                                                                                                                                                         

Best Regards,

Stephen Tao

 

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

2 REPLIES 2
v-stephen-msft
Community Support
Community Support

Hi @RF9809zpf ,

 

To create a table that contains the data for the entire year, you can use Power Query to filter the data from the "CURRENT" table for the months from January to the selected month, and filter the data from the "BUDGET" table for the months from the selected month to December.

To filter the data from the "CURRENT" table, you can use the "Filter Rows" transformation to keep only the rows where the "version" column contains the text "Current". To filter the data from the "BUDGET" table, you can use the "Filter Rows" transformation to keep only the rows where the "version" column contains the corresponding version for the selected month (e.g. "V04" for April) or a later version.

After filtering the data from both tables, you can use the "Append Queries" transformation to combine the two tables into a single table. And make sure that the data types of the columns and the names of the column headers should be consistent. For specific explanations, see the following example and Note.

vstephenmsft_1-1686624590784.png

Reference:

Append queries - Power Query | Microsoft Learn

 

   

                                                                                                                                                         

Best Regards,

Stephen Tao

 

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

Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).
https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-...
Please show the expected outcome based on the sample data you provided.

https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447...

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.

Top Solution Authors
Top Kudoed Authors