r/ExcelPowerQuery • • Jun 17 '24

Looking for help with transforming data for visualizations in PowerBI - multi-answer survey questions

2 Upvotes

Putting together a dashboard for exit survey data for my company. there are several multiple-choice and "select all that apply" questions that end up with multiple responses per person under one question.

I'm trying to figure out a way to transform this data that makes it actually usable within visualizations. I've scoured the internet and have yet to find something that works. I tried textjoining the multiple responses and then delimiting them in power query, however when I do this, it skews the data due to adding rows which essentially falsely increases my number of participants and throws off the percentages. I also tried delimiting by adding columns but that doesn't work either.

One important thing to note is that I also need to keep intact WHO entered what responses - because the aim of us using power BI is to use slicers to easily filter by the employees' company, location, tenure, etc. I need all the data to be together, rather than creating a separate table or sheet of that multiple choice questions.

I originally entered the responses in powerquery as all separate columns, and dragged each one to the values section of my visualization which did display the correct data in the pie chart, but in doing this, I'm unable to filter the values to only us the TopN filter. I have 20+ options and wish to only display the top 5, and it needs to be dynamic in that it will display the top 5 with any slicer in use.
One important thing to note is that I also need to keep intact WHO entered what responses - because the aim of us using power BI is to use slicers to easily filter by the employees' company, location, tenure, etc. I need all the data to be together, rather than creating a separate table or sheet of that multiple choice questions.

I hope that all makes sense - this has been driving me nuts for a week, can't figure it out. Any advice is appreciated

 


r/ExcelPowerQuery • • Jun 11 '24

How can one implement manual entries in Power Query?

2 Upvotes

Hello everyone, I have another Question again...

As the title says, I would like to be able to make Entries that don't get overwritten whenever I update the table. To be precise, two Columns right next to each other. Or technically, like 90ish, I guess, since they will be repeated over and over, after unpivoting (is that the right word, if ye basically turn all chosen columns into a single row?) it later, I guess? 🤔

On that note, are there ways to let Powerquery automatically add an Copy of the full last row, at the bottom, whenever ye add an new entry in the Column A? (Column A can be either like the mentioned columns-but without unpivoting-or just next to the table, if one can somehow let it accept that info from Cells that aren't part of itself or it's sorurce File?)

The Idea here is basically, that I have a list of articles, that will every so often expand, and I would have to add some Data manually every now and then there (Like how much is the minimum Stock of it), but this Data changes over time, and some other Tables need the old stuff to be available. I have solved this so far by copying and pasting the formulas (Lots of VLookup and stuff), but that's getting rather tedious, and worse, is prone to misstakes of sorts, especially if others work with this table... So I was hoping to automate both adding new Articles, and new time entries this way. With the exception of the columns that should be excempt from being overriden, that is (Though, if one could somehow make it so that their initial starting value is the same as the above, that would be great-They usually stay the same, but still too often to just leave them be... 😅)

I am not even entirely sure if that whole Idea is possible at all, since I am pretty new to Powerquery, so even the definite information/confirmation that this simply ain't feasible at all (even though I hope it is. and that there are more ways ye all can help me 😅), so I can just let this rest, would help a lot! 😅


r/ExcelPowerQuery • • Jun 08 '24

How can I add a custom column when combining data from multiple sources?

Post image
2 Upvotes

Here’s a sample. I have multiple excel files all formatted from the source with the same columns. Column 1 is team, column 2 is metric, column 3 has the month as the header and containing the data.

I want to be able to combine them using query into one file, but I want to add another column that pertains to month. I think this is the best way to sort this data when I load it to PowerBI so I can show progress by month on a line graph.

How do I do this with power query? TIA


r/ExcelPowerQuery • • Jun 04 '24

Create Date of files from SharePoint directory

2 Upvotes

I am building a consolidated AR report and I want to use the file create date as one of the datapoints. I had someone email me the files. While reviewing the files, I noticed the create date for each is today's date. I used PowerShell to change the create date to the date the file was initially created. I confirmed the dates changed in windows explorer and then I saved those files to SharePoint.

When I go and get the SharePoint folder in Power Query, it is still showing that these files were created today. I'm not sure if the create date I am seeing in the PQ window is the date they were created on SharePoint, or if it somehow is ignoring the changes I did in PowerShell. I want to use the date as a proxy for the measurement date in my model since the date is not explicitly stated in the excel files I'm working with. does anyone know how I might be able to get the updated create date from Power Shell? When I look a the files in SharePoint via windows explorer, it is showing me the correct create date, but PQ doesn't seem to recognize it and ocntinues to use today's date. Any thoughts on how I can get this data point into my?


r/ExcelPowerQuery • • Jun 02 '24

Pivoting budget file with multiple column headers

2 Upvotes

I'm trying to unpivot a massive file that is in the format below

And trying to get it into a format like this

I've tried leveraging PowerQuery and unpivoting the data set in but I am a novice and feel like I'm missing something. I need to get the departments and months moved. Any help would be appreciated!


r/ExcelPowerQuery • • Sep 25 '26

If Power Query says "Not a valid excel file" but source opens fine, read this first (version 2610 / 2609)

Thumbnail reddit.com
1 Upvotes

r/ExcelPowerQuery • • Aug 04 '26

Power query in Excel - Performances issue

Thumbnail
reddit.com
1 Upvotes

r/ExcelPowerQuery • • Jun 27 '26

FIFA World Cup Simulation by Power Query-Part1-query 01 Matches Rows

1 Upvotes

This query combines the tournament fixtures with user-entered scores and produces the foundation that every calculation in the tournament will rely on.

This FIFA World Cup project is one of the biggest Excel projects I've ever created. It combines advanced Excel formulas, Power Query, data modeling, and automation to simulate and manage an entire World Cup tournament from start to finish.

In this series, I won't just show you how the workbook works—I will explain the logic behind every table, every query, and every calculation so you can build similar professional solutions yourself.


r/ExcelPowerQuery • • Jun 05 '26

Calculating Occupancy Hours Across Dates

1 Upvotes

I want to calculate hotel room occupancy by the hour but when it goes past midnight I get an negative number and there for an error.

If it's same day (example in a second) I use = List.Numbers([Start], [End]-[Start]+1), I get the list then expand the list to individual rows.

- If start is 7am and end is 12p, I have rows of 7,8,9,10,11,12.

But when it starts at 10p and ends at 3am, it get a negative number and therefore a data error.

Is there any way to get this to return (in military time) 22,23,0,1,2,3 in the list?


r/ExcelPowerQuery • • May 27 '26

Gestion d'une variable de date dans Excel pour le filtrage dans Power Query

Thumbnail reddit.com
1 Upvotes

r/ExcelPowerQuery • • Apr 27 '26

What’s the most ridiculous Excel workaround you’ve ever had to build?

Thumbnail reddit.com
1 Upvotes

r/ExcelPowerQuery • • Apr 08 '26

how can i solve this power query editor error ?

1 Upvotes

i am noob please help me

video

.


r/ExcelPowerQuery • • Apr 01 '26

Excel Power Query: Renaming Queries Already Associated with Pivot Tables & Charts

Thumbnail
reddit.com
1 Upvotes

r/ExcelPowerQuery • • Mar 31 '26

PQ hangs forever in refresh when multiple computers are used to edit

1 Upvotes

I'm having a sudden problem in which when I make edits on another computer and try to refresh PowerQuery on my primary computer, it refreshes forever or sometimes refreshes for hours before throwing up a random memory error. Normally, the refreshes take between 3 and 10 minutes. I've used this setup for a year now with no issues before last week.

I have an relatively elaborate PowerQuery setup that pulls in shared data from many sources, including online, Dropbox, OneDrive, and in-workbook excel tables. Lots of merges, lots of custom formulas. All file locations are variable parameters that are changed via a dropdown in Excel.

I do most of my work on an up-to-date Windows 11 version of Excel running on a Mac via Parallels. The other machine I occasionally edit on is another up-to-date version of Excel on Windows 11. They are synced via Dropbox.

At first I thought my VM was corrupted, so I reinstalled fresh. It worked fine until the next time I edited on another machine. I've deleted all PowerQuery and Excel caches and it still happens.

Nothing I'm doing is new, so I'm not sure why it suddenly breaks.

Any thoughts?

UPDATE: I ended up refreshing my queries one-by-one. I found one that never refreshed. There was nothing wrong with the m-code, but I deleted it via the advanced editor, refreshed it, entered it again, and refreshed it, and it suddenly worked. I’m not sure what this did that deleting the cache wouldn’t do, but it works now.*


r/ExcelPowerQuery • • Mar 08 '26

Please recommend good reference books to learn Microsoft Excel for advanced level. Also, please suggest which version of Excel is used by organizations & individuals world wide.

Thumbnail reddit.com
1 Upvotes

r/ExcelPowerQuery • • Mar 01 '26

Anyone else getting double 401s on every Power Query Web.Contents request since today? (March 1st)

1 Upvotes

I have an API that Power Query connects to using Organizational Account authentication (Entra ID / Azure AD). The API returns the standard WWW-Authenticate challenge header so Power Query can discover the auth endpoint and acquire a token.

The expected behavior was: Power Query sends one unauthenticated request, gets the 401 challenge, acquires a token, and then reuses it for all subsequent requests — so you'd see one initial 401 followed by all 200s.

Starting today (March 1st), every single request from Power Query now does this:

  • 1st request: no Authorization header → 401 (~35µs)

  • 2nd request: still no Authorization header → 401 (~35µs)

  • 3rd request: valid token → 200

This happens on every call, not just the first one. It's like Power Query stopped caching the token between Web.Contents calls and is repeating the full discovery flow each time.

Nothing changed on my backend — same middleware, same Azure App Registration, same config. The timing (first of the month) makes me think an Office/Excel update rolled out overnight that changed something in how Power Query handles the OAuth challenge flow.

Is anyone else seeing this?


r/ExcelPowerQuery • • Feb 11 '26

Pointless question but I want to see if anybody knows the answer

1 Upvotes

Edit: Link to data layout is here as I hadn't realised Reddit would alter my post's format. https://imgur.com/a/ygHhxtX Hi everyone, this question is pointless because what I want already exists as a checklist online, but I'm curious to see if anybody knows a way to solve this type of problem using Power Query. I'm currently on a 2nd playthrough of Elden Ring and want to start checking off some of the items and experiences I would have missed on my first playthrough. One website has several such checklists. For example there is a list of all bosses to fight by region, with each boss having a name and location, and potentially information about the rewards it drops and any notes about the boss. This data is split into columns for name, location, drops, and notes. I could just use the online checklist, but thought I'd see if I could copy it into Excel. When copying into Excel, the data goes into a single column that looks like this. Each empty space is a blank cell, so the two blank spaces below are two blank cells.

Limgrave 0/31

Name Location Drops Notes

Soldier of Godrick Stranded Graveyard 400 runes Tutorial boss.

Tree Sentinel Church of Elleh Road 3200 runes, Golden Halberd Is one annoying bastard.

Demi-Human Chief (x2) Coastal Cave 900 runes, Tailoring Tools (Key Item), Sewing Needle (Key Item) Required for Boc the Seamster's quest. Boss arena also has multiple Demi-Humans.

Erdtree Burial Watchdog Stormfoot Catacombs 1300 runes, Noble Sorcerer Ashes

Beastman of Farum Azula Groveside Cave 1000 runes, Flamedrake Talisman

Stonedigger Troll Limgrave Tunnels 1800 runes, Roar Medallion

So there's a region heading, followed by two blank cells, followed by the names of the categories, followed by the boss data itself which takes up between 2 or 4 cells, followed by another blank before the next boss' data. I'm familiar with Excel but am very much a novice regarding Power Query. I've asked ChatGPT for help but it gets very confused. I'm wondering if anybody knows of a way to split this data into a similar format as the original website, with bosses grouped by region and having separate columns for name, location, drops and notes info. Thansks


r/ExcelPowerQuery • • Feb 10 '26

Right-click on table -> Edit Query no longer opens PQ?

1 Upvotes

I think the subject covers most of it - when I click edit query from the right click context menu....nothing happens?
I can still click edit query in the query pane and that works...but wondering if anyone else is experiencing this as of maybe a week ago?


r/ExcelPowerQuery • • Feb 05 '26

How to reference a query in a data validation list ?

1 Upvotes

I'm trying to create a data validation in an Excel cell. I would like my restricted data coming from a query stored in Power Query.

- the query is already a list
- I don't want to load the query in a sheet

Is it posible ?


r/ExcelPowerQuery • • Jan 30 '26

Trying to understand how Source works when reusing PQ steps

1 Upvotes

Hi, I reuse a bunch of PQ steps ifor a monthly report. The process for me is I have the spreadsheet that uses a source CSV and in 'Current CSV' folder I save the current month's CSV. I move the older CSV to another folder. Sometimes the PQ won't function because it is looking for the name of the older CSV. I can get around this by redoing the source, or renaming the new CSV but I am uncertain why this happens sometimes and not all the time? And is there something I should be doing so that the PQ process is just looking for the CSV in the source folder and not a specifically named CSV? Thank you.


r/ExcelPowerQuery • • Jan 06 '26

Unpivoting multiple columns. Making horizontal data vertical

1 Upvotes

I have a question that I’ve been working on for a couple hours. What I have are multiple columns each column is paired with its own date column next to it. So these are things like repair codes. Each repair code is going to have a date after it when that repair was made so I essentially have 15 repair codes and 15 dates each date is the column next to the repair code. What I want to end up with is all those horizontal columns listed out vertically the problem is I need to maintain some identification numbers with each row going down. I’ve been working at this and power query by un pivoting columns, but it is still leaving me hanging by either generating far too many duplicates due to the pivoting or I can essentially un pivot one of these things either the repair code column or the dates column, but I can’t seem to unproven both and have the vertical list that I need.

Before(wide/horizontal): Facility ID| Repair code1| repair date1| repair code2| repair date2| repair code3| repair date3|

After (tall/vertical): Facility Id| repair code1| repair date1 Facility Id| repair code2| repair date2 Facility Id| repair code3| repair date3


r/ExcelPowerQuery • • Dec 26 '25

Copy Transformations Across Worksheets and Re-loading Tables

1 Upvotes

Hi everyone,

I am working with a file that has n worksheets that I need to perform identical transformations on (grouping, removing columns, etc.). I would like to then obtain a file with each transformed worksheet loaded to a single table and in its single worksheet. I am aware that I can create a query and copy/paste it for whatever number of occurrences I am working on, but I would like to know if there is a more efficient way to achieve this. I already tried converting my query into a function but that route stopped short from working; my end result is a table with all sheets appended on top of one another. Thanks in advance


r/ExcelPowerQuery • • Dec 13 '25

Is it possible to modify individual files using one file as an example when you use get data from folder?

1 Upvotes

I am trying to get only certain cells from multiple files and then combine them together, doing it one by one from data from excel would defeat the point of using PQ. I tried getting data from folder and I get to the stage where I have my content in binary and name of file I want to keep. The only way I know how to modify the data in the files instead of meta data is to combine files, but if I do that I will not be able to filter the information inside the files the way I want. Specifically, Inside of hte files are a lot of rows I do not need, screenshot 2. I want to remove all rows that are not 1 and 2 and promote headings, which I know how to do, but I do not know how to do that if I combine files because it will delete information I need. I am not sure how to do so with filtering either because I will have more than "peak 1" and there are other rows called "peak 1" that I do not need, screenshot 3.
So is there a way to edit all files based on one example when using get data from folder?


r/ExcelPowerQuery • • Dec 13 '25

Using Power Query is it possible to store both the unique ID and the trial number from the excel file name?

Thumbnail reddit.com
1 Upvotes