Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hi,
I have a table with 4 columns and a few rows.
I want to iterate over this table and pass each row to a personal function. This personal function simply creates a table using the parameters (i.e, the values contained in the passed row).
Then, at the end, I want all tables created during iterations to be combined.
How can I do this iteration easily in M?
Regards
Hi @jct999 ,
Not very clearly....But it seems like you want to filter the table by parameter and then append all filtered table ,right?
Please take a look at the pbix file here.
Did I answer your question ? Please mark my reply as solution. Thank you very much.
If not, please upload some insensitive data samples and expected output.
Best regards,
Eyelyn Qin
Hi @jct999 ,
You need to create a custom function and then when you expand the final result you get the table you need.
Can you please share a mockup data or sample of your PBIX file and expected result. You can use a onedrive, google drive, we transfer or similar link to upload your files.
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsThanks for your answer but it is not clear for me.
The table I want to iterate has 4 columns :
- FILE_NAME
- YEAR
- MONTH
- AUTHOR_ID
My personnal function just loads the file FILE_NAME in a table and add 3 columns to this table : YEAR, MONTH dans AUTHOD_ID.
Then, at the end, I want to combine all the table loaded in one table.
I can't send you my model nor PBix file... Could you show me an exemple.
Regards
Can you please share a mockup data or sample of your PBIX file. You can use a onedrive, google drive, we transfer or similar link to upload your files.
If the information is sensitive please share it trough private message.
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsThanks for your reply, but it is not clear to me.
The table I want to iterate has 4 columns:
- FILE_NAME
- Year
- MONTH
- AUTHOR_ID
My personal function just loads the FILE_NAME file into a table and add 3 columns to this table: YEAR, MONTH dans AUTHOD_ID.
Then at the end I want to merge all the loaded table into one table.
I can't send you my model or the PBix file ... Could you show me an example.
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 39 | |
| 37 | |
| 33 | |
| 33 | |
| 29 |
| User | Count |
|---|---|
| 132 | |
| 90 | |
| 78 | |
| 66 | |
| 65 |