How to use the Excel MAP and REDUCE functions

Поділитися
Вставка
  • Опубліковано 17 гру 2024

КОМЕНТАРІ • 17

  • @ExcelWizard
    @ExcelWizard Рік тому +7

    It is very nice to explain complex ideas in a simple way.

    • @DimEarly
      @DimEarly  Рік тому

      Thanks Bo!

    • @ankurshukla2516
      @ankurshukla2516 Рік тому +1

      Thank you Dim and BO for your excellent work. I appreciate your efforts in creating video solutions for the Excel BI Power Query challenges. I find them very helpful and informative. Please keep up the good work and share more videos if possible.

  • @Harryjackgross
    @Harryjackgross 20 днів тому

    I really love using this case as a way to explain MAP and REDUCE - so clean

    • @DimEarly
      @DimEarly  20 днів тому +1

      In your unbiased opinion? ; )

    • @Harryjackgross
      @Harryjackgross 20 днів тому

      @@DimEarly I couldn't have made this case into such a clear explanation of anything if I had a thousand years 🤣

  • @ExcelHechoFacil
    @ExcelHechoFacil Рік тому +1

    Gracias Diarmuid por esta master class, me encanta como usas la funcion map en este ejemplo. Es un gusto poder verte resolviendo estos retos con Excel. Saludos.

    • @DimEarly
      @DimEarly  Рік тому

      Gracias! Hoy he aprendido la palabra 'retos' - me gusta! : )

  • @nemoyatpeace
    @nemoyatpeace Рік тому

    Wow, That was really cool. I didn't realize MAP could take multiple inputs. I also really struggled with that level. Here's another one that I need to work through to fully practice and understand it! Lot's of homework for the off season! Good luck in Vegas!

    • @DimEarly
      @DimEarly  Рік тому

      Thank Danny! And yes, never stop learning : )

    • @nemoyatpeace
      @nemoyatpeace Рік тому

      Just worked through this one your way. So much easier knowing I can just work with the 2D array and the 1D array with the same formula, I had spent so much time flattening the lvl4 & 5 flowerbeds into a single line for my pathetic formulas previously!@@DimEarly

  • @TopBam
    @TopBam Рік тому

    Great video! I think it would be helpful if you would do another video without the custom functions in map and reduce.

    • @DimEarly
      @DimEarly  Рік тому +2

      Glad you liked it!
      I find it tricky to explain the value of these functions to people without using a more complex LAMBDA - the ‘basic’ examples just get people thinking about alternatives that don’t need that (e.g. REDUCE is not the best way to add up a list of numbers or concatenate a text string, and MAP is not the best way to combine text like in my canned example at the start).
      There’s probably a sweet spot that’s in between the two, but in this case the genesis was the other way around (i.e. I looked at the problem and thought ‘this could make a good demo for MAP and REDUCE’ rather than looking at MAP and REDUCE and thinking about a good use case to demo them).

  • @TA_ANTA
    @TA_ANTA 9 місяців тому

    Great video! Really appreciate the effort you are putting into the content.
    For level 3, I have so far carried over my approach from Level 2 (changing the last condition from Sunflowers (S) to Tulips (T) to match the context of the question. My pivot input is currently in N43 as PivotInput. Avoiding a data table approach, I am stuck with solving the issue with a MAP function to pick up a range of inputs ("A1"-"C3") and feed it into the formula as opposed to just whatever is in N43.
    Can a MAP() be added to this? If so, I would greatly appreciate your guidance on how to do so :)
    In my mind, I'm picturing/hoping that MAP() can be applied somewhere and then an array of results will show for each input for "A1" to "C3" inputs that I can then apply a Max() to. I've tried to delete PivotInput, N43, from the formula below and wrap the remaining within =MAP([my range of inputs],lambda(PivotInput,[existing formula])) to no avail.
    =LET(
    PivotInput, N43,
    STXletters, O43:W43,
    matrixrange, $O$34:$W$34,
    AD,CELL("address",INDIRECT(matrixrange)),
    ADup,IFERROR(CELL("address",OFFSET(INDIRECT(matrixrange),-1,)),""),
    ADdown,IFERROR(CELL("address",OFFSET(INDIRECT(matrixrange),1,)),""),
    ADleft,IFERROR(CELL("address",OFFSET(INDIRECT(matrixrange),,-1)),""),
    ADright,IFERROR(CELL("address",OFFSET(INDIRECT(matrixrange),,1)),""),
    stackedAD,VSTACK(AD,ADup,ADdown,ADleft,ADright),
    cleanedstackedAD, SUBSTITUTE(stackedAD,"$",""),
    relevantcells,CHOOSECOLS(cleanedstackedAD,XMATCH(PivotInput,matrixrange,0)),
    PivotedSTXletters,IF(ISNUMBER(MATCH(matrixrange,relevantcells,0)),SWITCH(STXletters,"T","S","S","T","X","X"),STXletters),
    SUM(--(PivotedSTXletters="T"))
    )

  • @muazahmed9644
    @muazahmed9644 11 місяців тому

    Hello! a quick question! is pivot function part to excel usual function or was it created for this workbook (using let or other)?

    • @DimEarly
      @DimEarly  11 місяців тому

      Yes, that’s a custom LAMBDA that was written for this workbook.

    • @muazahmed9644
      @muazahmed9644 11 місяців тому

      @@DimEarly got it! Thanks!!