Bring Excel Sheet Variable Into Power Query (Query Input from Excel Sheet) - EMT 1615

แชร์
ฝัง
  • เผยแพร่เมื่อ 29 ม.ค. 2025

ความคิดเห็น • 110

  • @excelisfun
    @excelisfun  5 ปีที่แล้ว +6

    If your Variable is a Folder or File Path, then you need to use this technique: th-cam.com/video/0NX-GctfZuU/w-d-xo.html

  • @ryanbartlett672
    @ryanbartlett672 ปีที่แล้ว

    Used this at work today to avoid hard-coding a date limiter. Thanks!

  • @djl8710
    @djl8710 5 ปีที่แล้ว +10

    I feel like a boomerang, I go away and keep coming back for more!

    • @excelisfun
      @excelisfun  5 ปีที่แล้ว +2

      Love it!!!! Love the boomerang simile and that you keep coming back for more fun With Excel : )

    • @GeertDelmulle
      @GeertDelmulle 5 ปีที่แล้ว +2

      Djl, what are you talking about... I never leave! ;-)

    • @excelisfun
      @excelisfun  5 ปีที่แล้ว +1

      @@GeertDelmulle Nice!!!!!!!!!!!

    • @pmsocho
      @pmsocho 5 ปีที่แล้ว

      Same for me :)

  • @khoinguyeninh5835
    @khoinguyeninh5835 ปีที่แล้ว +1

    Very ez to understand. Thank you.

  • @slayermm1122
    @slayermm1122 2 ปีที่แล้ว

    this is what i've been looking for years!!!!!

  • @prabhuk4119
    @prabhuk4119 5 ปีที่แล้ว +1

    You are a great teacher Sir!! I learned a lot from you. Thank you very much

    • @excelisfun
      @excelisfun  5 ปีที่แล้ว

      Glad you can learn a lot from my videos, prabhu!!!! Thanks for your support on each video that you learn from with those comments, thumbs ups, and of course your sub : )

  • @vivekkp4628
    @vivekkp4628 2 ปีที่แล้ว +1

    Thank you so much Mike, helped me a lot. Excellent explanation

    • @excelisfun
      @excelisfun  2 ปีที่แล้ว

      You are welcome, Vivek!!!

  • @wayneedmondson1065
    @wayneedmondson1065 5 ปีที่แล้ว

    Hi Mike.. super cool tip to bring a sheet variable into Power Query. Thanks for the technique and thorough explanation. Thumbs up!

    • @excelisfun
      @excelisfun  5 ปีที่แล้ว

      You are welcome, Wayne! Thanks for the support : )

  • @pravinshingadia7337
    @pravinshingadia7337 2 ปีที่แล้ว

    Thank you Mike. This helped me solve an urgent problem today and learned something new along the way. Magic Tricks are awesome!

  • @lindalai1406
    @lindalai1406 3 ปีที่แล้ว +1

    As always, very informative and helpful, Thank you very much.

    • @excelisfun
      @excelisfun  3 ปีที่แล้ว

      Glad it is helpful, Linda!!!!

  • @MySpreadsheetLab
    @MySpreadsheetLab 5 ปีที่แล้ว +5

    This was very helpful. Thanks Mike!

    • @excelisfun
      @excelisfun  5 ปีที่แล้ว

      You are welcome, Teammate Kevin!!!!

  • @ExactProBi
    @ExactProBi 5 ปีที่แล้ว +5

    Thanks, Mike, I used this trick recently in one of my client's reports!

    • @excelisfun
      @excelisfun  5 ปีที่แล้ว +1

      Lucky client to have you ; )

  • @OzduSoleilDATA
    @OzduSoleilDATA 5 ปีที่แล้ว +5

    Good one!

  • @DougHExcel
    @DougHExcel 5 ปีที่แล้ว

    Thanks for demo-ing the Positional and Field Access Operators!

  • @vitao7389
    @vitao7389 ปีที่แล้ว +1

    Clear, simple and handful 🎉🎉🎉

    • @excelisfun
      @excelisfun  ปีที่แล้ว

      Glad you like it!!!

  • @peterv3122
    @peterv3122 2 ปีที่แล้ว +1

    Nice one. Big thanks!

    • @excelisfun
      @excelisfun  2 ปีที่แล้ว

      You are Big welcome!!!

  • @chrism9037
    @chrism9037 5 ปีที่แล้ว +3

    This was great, thanks Mike!

    • @excelisfun
      @excelisfun  5 ปีที่แล้ว

      You are welcome, Chris!

  • @paspuggie48
    @paspuggie48 5 ปีที่แล้ว +3

    I love this way of working Mike. I use a similar method for getting lists of filenames from multiple SharePoint libraries...so much quicker 😉

    • @excelisfun
      @excelisfun  5 ปีที่แล้ว

      Cool example. So, in your example, you provide Power Query with List Name from Excel Sheet?

  • @floppyBE565
    @floppyBE565 7 หลายเดือนก่อน

    thank you was stuck with my variables, now it s fine thank you

  • @kalderman71037
    @kalderman71037 2 ปีที่แล้ว +1

    Clear and precise. Thank you.

    • @excelisfun
      @excelisfun  2 ปีที่แล้ว

      You are welcome!

  • @Mannyman348
    @Mannyman348 2 ปีที่แล้ว +1

    Absolute legend. Thank you

    • @excelisfun
      @excelisfun  2 ปีที่แล้ว

      You are welcome!!!

  • @vida1719
    @vida1719 5 ปีที่แล้ว +1

    Great way of filtering table. I used this method with dates to extract data for a certain period

    • @excelisfun
      @excelisfun  5 ปีที่แล้ว

      Cool, Vida!!!!

    • @tumshukurumhalila9217
      @tumshukurumhalila9217 3 ปีที่แล้ว

      Hello Vida, Just want to know if the reference Cell is Calendar or you just type the date in that field .... @Mike you are also welcome for the comment.

  • @GeertDelmulle
    @GeertDelmulle 5 ปีที่แล้ว +2

    Thanks for the video. Interesting to see that you only have to refresh the fTable Query to see the effect.
    BTW: you could have done the same by right-clicking on the resulting table and selecting refresh, just like with a pivot table.

    • @excelisfun
      @excelisfun  5 ปีที่แล้ว +1

      Good tip: just right-click refresh the table : ) P.S. Thanks for the idea, Geert : ) : )

    • @GeertDelmulle
      @GeertDelmulle 5 ปีที่แล้ว

      Mike, you’re welcome. Take good care of yourself!

  • @sherryizzie5309
    @sherryizzie5309 5 ปีที่แล้ว

    Like the way you use the positional index operator and filed access operator to get the value instead of using the drill down:):)

  • @katerina6495
    @katerina6495 5 ปีที่แล้ว +2

    Great Mike, thank you

    • @excelisfun
      @excelisfun  5 ปีที่แล้ว

      You are welcome, Katerina : )

  • @alirezamogharabi8733
    @alirezamogharabi8733 5 ปีที่แล้ว

    Thank you Mike, please make more videos for us, you are amazing!

    • @excelisfun
      @excelisfun  5 ปีที่แล้ว +1

      Okay! I'll make more, as long as you keep supporting with your comments and thumbs ups!!! How about a new video today on this same topic, but bringing the variable into a DAX Formula?

  • @conradohernanvillagil2764
    @conradohernanvillagil2764 5 ปีที่แล้ว +3

    Amazing!

    • @excelisfun
      @excelisfun  5 ปีที่แล้ว

      Glad it is amazing for you, Conrado!!!!

  • @mohamedchakroun4973
    @mohamedchakroun4973 5 ปีที่แล้ว +1

    Thanks Mike For Finding the M code of advanced Filter In Excel:-) a lot of funnn and a lot of practise :-)
    The same result could be reached by using advanced Filter

    • @excelisfun
      @excelisfun  5 ปีที่แล้ว +1

      Yes, it could. But if data is coming from external source, then Power Query is probably easier than Advanced Filter. But this method of getting a variable into Power Query could be used in any situation, data filtering or not : )

    • @mohamedchakroun4973
      @mohamedchakroun4973 5 ปีที่แล้ว

      @@excelisfun yes it is :-)

  • @ricos1497
    @ricos1497 5 ปีที่แล้ว

    Mike, great video. I much prefer using named ranges than tables which work in the same way. More often than not, my filters are vertical on the spreadsheet or in non-adjacent cells, so I find using the cell names nicer. Same principal of course.

    • @excelisfun
      @excelisfun  5 ปีที่แล้ว

      Excel Names are a great tool! Love it that you use them, Rico S : )

  • @OakleyTurvey
    @OakleyTurvey 5 ปีที่แล้ว +1

    Thanks as ever.

    • @excelisfun
      @excelisfun  5 ปีที่แล้ว +1

      You are welcome as ever, Oakley : )

  • @davebowman5392
    @davebowman5392 5 ปีที่แล้ว +2

    Really useful and powerful, my grip on Advanced Filter is coming loose!!

    • @excelisfun
      @excelisfun  5 ปีที่แล้ว +1

      No, no, no, Advanced Filter still has so great uses : ) With Advanced Filter: 1) We don't have to convert to Excel Tables, 2) We don't get the yellow button at the top of the worksheet when we open the Workbook, 3) Tasks like Comparing two lists in the Excel Sheet is easier, 4) We do not want output as an Excel Table... and more. But yes, somethings are easier with Power Query : ) The grip is loosening.

    • @davebowman5392
      @davebowman5392 5 ปีที่แล้ว +1

      @@excelisfun Ha Ha, yep, I ain't going to give it up just yet, still my fav!

    • @excelisfun
      @excelisfun  5 ปีที่แล้ว +1

      @@davebowman5392 Me too! We should start the Advanced Filter Fan Club : ) : )

  • @cesartonoli19
    @cesartonoli19 ปีที่แล้ว +1

    thank you!

  • @mattschoular8844
    @mattschoular8844 5 ปีที่แล้ว +1

    Excellent. Thanks Mike

    • @excelisfun
      @excelisfun  5 ปีที่แล้ว

      You are welcome, Matt!!!!

  • @Luciano_mp
    @Luciano_mp 5 ปีที่แล้ว

    Nice. Thank you!...👍👍👍

  • @MalinaC
    @MalinaC 5 ปีที่แล้ว

    Briliant and super‐easy‐cool!

    • @excelisfun
      @excelisfun  5 ปีที่แล้ว

      I like this: super-easy-cool : ) : )

  • @donovannewton9507
    @donovannewton9507 4 ปีที่แล้ว

    So is there an easy way to use the Data List drop down to refresh on opening to show all the sheet names and dates, so you can then select say an updated price list? Or tell Power Query to only use the latest updated xlsx file in a folder?
    I ask this because we don’t want to delete to old file in case we want to reference that in a later query?

  • @arnaudseguin6404
    @arnaudseguin6404 5 ปีที่แล้ว

    Hi Mike, thank you this.
    How could I adapt the Table.SelectRows to ignore the Website argument if it is left blank on purpose to only perform the filtering by the product argument instead?

  • @johnborg6005
    @johnborg6005 5 ปีที่แล้ว

    Thanks mike. Very interesting.

    • @excelisfun
      @excelisfun  5 ปีที่แล้ว +1

      You are welcome, John Borg! Thanks for always stopping by in the comments : )

    • @johnborg5419
      @johnborg5419 5 ปีที่แล้ว

      @@excelisfun Its's the least anyone can do for all of this. : ) : )

  • @edme1055
    @edme1055 ปีที่แล้ว

    how to do this when cell value B5, for product, would include the option to choose "ALL" (so actually the user then chooses not to filter)?

  • @jasmadsen
    @jasmadsen 2 ปีที่แล้ว

    Is there a way to do this with a Date? When I try to enter it in, it wants multiple inputs for month, day, year, and I'd rather create a variable based on the Today() function Excel.

  • @donychen2162
    @donychen2162 5 ปีที่แล้ว +2

    wow! it makes a power dynamic query, so we don't need to go to power query to edit parameters every time, right? and I have one question, is it able to make query result refresh automatically?

    • @excelisfun
      @excelisfun  5 ปีที่แล้ว +2

      No. THE only feature in all of Excel that can do that is formulas. That's it. Think about it: We do not mind if we have to refresh our PivotTable or Advanced Filter result when source data changes, so we should not mind with Power Query either. Said a different way: The beauty of formulas for the 40 year history of spreadsheets is that they update when source data changes, everything else needs a refresh. However, you could use VBA to recognize when the cell has changed to do an automatic update.

    • @donychen2162
      @donychen2162 5 ปีที่แล้ว

      @@excelisfun Thanks teacher Mike, yep , Thinking about PviotTable and Advanced Filter and power query , they really similar, we have to refresh the result wheen source data changes. thanks to teacher Mike , you expand my knowledge about Excel more deeply again!

    • @excelisfun
      @excelisfun  5 ปีที่แล้ว

      @@donychen2162 You are welcome, Dony! Thanks for stopping by in the comments : )

  • @cwjr1968
    @cwjr1968 3 ปีที่แล้ว

    Mike... I'm attempting to refer to a worksheet cell for writing a function when adding a column in Power Query. I feel like this should be common, but I can't find any information on the subject. Specifically, I am projecting overtime on our fire department's schedule. I have a query that shows the number of firefighters working by date and a cell in the workbook that contains the minimum manning number. How do I "import" the minimum manning number into a function within the query? Any help would be great. If you have a video that shows this, please share! Thank you very much in advance.

  • @ogwalfrancis
    @ogwalfrancis 5 ปีที่แล้ว

    Great solution, Thanks

    • @excelisfun
      @excelisfun  5 ปีที่แล้ว +1

      You are welcome, Ogwal!!

  • @lawrence2786
    @lawrence2786 5 ปีที่แล้ว

    Thanks for all the great videos.
    Question: If the data is large does this use of variable slow down the query?

  • @sujik1003
    @sujik1003 4 ปีที่แล้ว

    Hello, i come across a peculiar problem while connecting a file to power query. The file downloaded as html with.. xls extension. Pl give a solution at the earliest.

  • @stevennye5075
    @stevennye5075 5 ปีที่แล้ว

    excellent!

    • @excelisfun
      @excelisfun  5 ปีที่แล้ว

      Thanks, Steven Nye : )

  • @RJYL
    @RJYL 5 ปีที่แล้ว

    Cool!

  • @MichaelRygaard
    @MichaelRygaard 4 ปีที่แล้ว

    How would you make this work with a list? (not a drop down selection but if I type {1,5,8} I want to use this as a list for selection. (i tried some list.contains, but that was ofc wrong since my variable is not a list but a variable... -.- - I could ofc make a list next to the table i use as a variables - but this is not as elegant as if i could make this work

  • @myofficetop
    @myofficetop 5 ปีที่แล้ว +1

    Great

    • @excelisfun
      @excelisfun  5 ปีที่แล้ว

      Glad it is great for you, Paul : )

  • @Sal_A
    @Sal_A 5 ปีที่แล้ว

    MG - thanks for the informative video. Just trying to think, when should I use this setup? If my fact table has +1 million rows of data and I want to query it based on a drop-down list?

    • @excelisfun
      @excelisfun  5 ปีที่แล้ว

      Yes, this is a good use, but better to use Data Model and DAX VALUES function as seen in next EMT: th-cam.com/video/nVoqWGIN7Mc/w-d-xo.html
      If my fact table has +1 million rows of data and I want to query it based on a drop-down list? In MSPTDA video I show how to import from 7 million rows in Data Model into Excel Sheet: th-cam.com/video/Rbkbr89cuHo/w-d-xo.html at the 02:03:15 hour mark.

  • @michaelt312
    @michaelt312 3 ปีที่แล้ว

    Trying to use a date range from user input and can't figure it out. Any ideas?

  • @rahulmatte
    @rahulmatte 4 ปีที่แล้ว

    Some reason I am not able to make this work.. I created a variable but when i apply it to main query filter condition nothing get pulled up. After adding a filtering condition in main query i get a security message as 'Permission is required to run this native database query'. No matter what i select here, i get empty result after applying the variables.. I am retrieving data from ODBC connection..
    When i apply my filter reference 'Variable' it is not returning any result.
    Table.SelectRows(Source, each ([TRID] = "Variable"))

  • @BillSzysz1
    @BillSzysz1 5 ปีที่แล้ว

    Thank You, O Master!!! :-))

    • @excelisfun
      @excelisfun  5 ปีที่แล้ว

      You are welcome, O PQ Poet Master!!!!

  • @DEXTER-bn9zu
    @DEXTER-bn9zu 3 ปีที่แล้ว

    How we can apply same features on data range?

  • @VITORB82
    @VITORB82 5 ปีที่แล้ว

    Any way to update automaticaly the filtered table?

    • @excelisfun
      @excelisfun  5 ปีที่แล้ว

      You can do a line or two of VBA. But I do not know a non-VBA way.

    • @VITORB82
      @VITORB82 5 ปีที่แล้ว

      @@excelisfun thank you for the help. Hope Microsoft finds a way to solve this.. as in my work when i talk about Power query people still think it's sorcery.

    • @excelisfun
      @excelisfun  5 ปีที่แล้ว

      @@VITORB82 Well. Power Query is the greatest Excel Invention since the PivotTable, and it took about 10 years until everyone was using PivotTables. It takes time. But in terms of refreshing, remember things in Excel like PivotTables, Advanced Filter and other tools, they all require a refresh!!!!!!!!! So it should not be a big deal. Formulas are THE only feature in Excel that refreshes automatically when source data changes. Thanks for stopping by in the comments, Vitor.

  • @gagan123danu
    @gagan123danu 5 ปีที่แล้ว

    hey good job ,, here to resolve one of my querry . got stuck on one of my project .. (eg.i get daily attendence sheet of 30 student and i have to sort and record yearly 5 students attendance data by days , so i used INDEX AND MATCH function to match current date and student name to give present days attendence and record it , but the problem thats coming is as excel doesn't have ENDIF function so as a result each present day the sheet is updating and couldn't aable to record previous days data ,, please guide through me

  • @MichaelRygaard
    @MichaelRygaard 4 ปีที่แล้ว

    wow - Nice (I was congratulating my self for thinking this was possible, now im thinking you for showing me how:) ) - one thought though - I would like to make this a bit more flexible so i have 5 parameters like (customers, order, date_from, Date_to and location) - but what if i want to be able to select only say 1 or 3 of them and not all 5 (Eg. i select dates +customer ) or i select only location then rest should be blank (all) - can you do that ? (im thinking you can... will you show me ? )

    • @MichaelRygaard
      @MichaelRygaard 4 ปีที่แล้ว

      ok so this work where "Ændret type" is the step before this = if #"Variable_ ordre" =null then (Table.SelectRows(#"Ændret type", each ([WS.VE_OR_ID] null))) else (Table.SelectRows(#"Ændret type", each ([WS.VE_OR_ID] =#"Variable_ ordre")))

  • @brianxyz
    @brianxyz 5 ปีที่แล้ว +5

    First! lol

    • @excelisfun
      @excelisfun  5 ปีที่แล้ว

      First place trophy goes to.......... brianxyz!!!!!!!