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!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
Hi all,
At the moment I have a table for which I calculate values based on the columns starting with column 42.
So I used List.Skip(Table.ColumnNames(Source),42)
to get the columns on which I want make calculations. This all works fine as can be seen in the picture below. I had to do it this way because on random occasions new months can pop up after the last column.
However, now someone asked me to aggregate all data after "Dec 2021". Like I mentioned the amount of columns after Dec 2021 changes all the time.
The difficult part is that when March ends, the first item in the list becomes "Apr 2021". So I can't select all data after "Dec 2021" using the index, like I did in the example above. I need to select the index of all data after Dec 2021 using the name "Dec 2021" in the list. However, as far as I know, I only can select an item in the list based using the index number, not the other way around.
How can I tackle this?
I want to keep it flexible so I can easily change the data to aggregate in the advanced editor. So in a few months I'd like to aggregate all data from Mar 2022 for instance. It would be great of I would have to simply change "Dec 2021" , to "Mar 2022" somewhere in the query editor.
Kind regards,
commodity_check
Hi @Anonymous
I can't see youur data but my gut tells me your data is in the wrong format. You should have a single column for date, not multiple columns for every month/year - as you already see, this cuases the number of columns to change.
If youu can show what your data looks like, and provide some sample data, perhaps there's a more efficient approach to this problem.
Regards
Phil
Proud to be a Super User!