FMWC Brazil round 1 walkthrough
12:14
Can I do esports in Portuguese??
8:27
Пікірлер
@nemoyatpeace
@nemoyatpeace Күн бұрын
Very much looking forward to this series! I think I know the answer from reading a couple of comments, but I'd love to know if there is a way to have these added to all workbooks by default.
@DimEarly
@DimEarly Күн бұрын
It might be possible to have them appear in any new file you create (you can change the template that new files open from, so maybe you could add that), but I doubt you’d want to have them injected into every existing file you open even if they’re not being used. There are some pretty zippy ways to import them though…
@ValyGreavu
@ValyGreavu 2 күн бұрын
Often, in the context of a large volume of data, we need functions that are optimal in terms of execution and runtime. Of course, the time depends on the amount of data as well as the method of solving. In this context, we need a time counter. In Excel, there are add-ons for this or VBA. Considering that I am not a fan of VBA, I looked for a solution within a LET(). Please let me know if this approach seems okay to determine / approximate execution time. =LET(ts, NOW(), matrix, MAKEARRAY(300000, 10, LAMBDA(r,c, SUM(r,c))), summ, SUM(matrix), tf, NOW(), HSTACK(ts, summ, tf))
@DimEarly
@DimEarly 2 күн бұрын
Yes! I think I learned this technique from Bo Rydobon or Bhavya Gupta originally. Since the running times are usually pretty fast, I think the way Bo usually does it now is something like this: LET(st, NOW(), mainCalc, <whatever>, HSTACK(mainCalc, TEXT(NOW()-st, “s.00”)) That way it gives you the result and the run time in seconds to 2 decimal places (I think that’s the limit of the accuracy).
@ValyGreavu
@ValyGreavu Күн бұрын
@@DimEarly thank you for detailed message. Yeah, accuracy seems to be a issue...
@sledgehammer-productions
@sledgehammer-productions 2 күн бұрын
the lambda to make a lambda..... 😀
@DimEarly
@DimEarly 2 күн бұрын
Haha - have you seen it? It’s coming… but I thought I would make for an intimidating start to the series! 😂
@SN-us5se
@SN-us5se 2 күн бұрын
Looking forward for more videos in this series.
@mohammedbaydoun9464
@mohammedbaydoun9464 2 күн бұрын
Excited for next videos, thanks for the efforts!
@littlecandyschannel
@littlecandyschannel 3 күн бұрын
Great video! thanks so much for the explanation... May I ask how to extract the date using REGEX? The date in a string can be in different pattern and languages, for example 4-19-2024, 4/19/2024, 4.19.2024, 19.4.2024, 4月19曰2024年, Apr 19, 2024, 19th April 2024.... (Note: 月 means month, 日 means Day, and 年 means year)
@DimEarly
@DimEarly 2 күн бұрын
If your date is entered in free text in an unknown language, it will be somewhere between challenging and impossible to parse it (challenging if you ‘just’ have to find the words for each month in dozens of languages, impossible if you have a date like 3/4/2024 which will mean different things depending on the culture of the person who entered it). I would say you’d be much better off trying to have tighter input control than deal with garbage data using regex! If there are a finite number of possible patterns *AND* they are mutually exclusive (unlike, say, dd/mm/yyyy and mm/dd/yyyy) then you could write a regex to match and extract each one, but it could be very messy if the number of possible patterns is large.
@LyubomirRusanov
@LyubomirRusanov 3 күн бұрын
LAMBDA is very useful and together with dynamic arrays completely changes making of models. Only one thing is missing for me - there is no possibility to put comments in the code to improve readability. Yes, you can use some hack, but native support would be much better.
@DimEarly
@DimEarly 2 күн бұрын
I’m always glad to meet a fellow LAMBDA fan! : ) It’s not *exactly* native, but take a look at the Advanced Formula Environment (I’ll also talk about it later in the series). It’s helpful for development, and allows for in-line comments (although I think they don’t get saved in the name manager, so they’re only visible in the AFE). If you use LET (another topic I’ll come to later in the series!), you can also use comment variables, as in LET(calc, a+b/c, calc_note, “b/c is the performance adjustment”, …
@jazzista1967
@jazzista1967 3 күн бұрын
Diarmuid.. great introduction on Lambda functions. Look forward to your next video on how to create and save those custom functions. I have noticed lately that i have found myself writing the same Lambda functions over and over again to extract or clean data but now i have the need to save them and re-use them instead of writing them from scratch over and over . A few months ago, i had to create a Cartesian joint stitching 3 tables together using lambda helper functions and that was a drudgery. That will be my first custom function to save. Thanks
@DimEarly
@DimEarly 2 күн бұрын
It’s definitely worth having some good ways to reuse them, and I will talk about that down the line (but I’m planning to start very basic!). For me, I keep a file with LAMBDAs I regularly use in my pinned file list so I have it whenever I need it - but I’m starting to be won over by Team GitHub / Gist as a better way of sharing with others.
@jazzista1967
@jazzista1967 2 күн бұрын
HI Diarmuid! Thanks for your reply. Are you going to walk us through on how to save the Lambdas in Github? I guess you need to create an account for that. Anyway, I am anxiously waiting for your next video. Regards
@ChristianMbolanantenaina
@ChristianMbolanantenaina 3 күн бұрын
Can't wait to learn from your series✨ Thanks for sharing a valuable content , I always learn something new on each videos on your playlist 🚀
@DimEarly
@DimEarly 2 күн бұрын
Thanks Christian, that's always so good to hear!
@Mohamed77779
@Mohamed77779 3 күн бұрын
thank you mr. Diarmuid for the effort you put in your videos
@playlists9782
@playlists9782 3 күн бұрын
I'm looking forward to the series, thank you for posting
@tamersalem7542
@tamersalem7542 3 күн бұрын
wonderful ❤
@michaelbrown8821
@michaelbrown8821 4 күн бұрын
I'm looking forward to this series too. I've already created my functions workbook with my most used functions. Looking forward to adding to it with new ideas. Thx Diarmuid.
@CraigHatmakerBXL
@CraigHatmakerBXL 4 күн бұрын
😃
@HadynWiseman
@HadynWiseman 4 күн бұрын
Looking forward to this series!
@joshritchie7038
@joshritchie7038 4 күн бұрын
This is awesome! I always like to see how functions like LET and LAMBDA can be put to better use for practical applications. My field is Mechanical Engineering, and I have learned so much from your content that I apply in my work every day. The most used LAMBDA I have written so far is a simple crossproduct calculation. I know stuff like Octave and Python can do it natively, but my colleagues dont know how to program, so my work can't be documented for everyone to use, but Excel can.
@DimEarly
@DimEarly 4 күн бұрын
Thanks Josh - it's always good to hear that someone has found my stuff helpful!
@richardhay645
@richardhay645 4 күн бұрын
Great!!
@elbadlis
@elbadlis 4 күн бұрын
Wow, this is a university-level lecture. Thank you for sharing your knowledge, Diarmuid. I'm looking forward to the next video in the series.
@peterbartholomew7409
@peterbartholomew7409 6 күн бұрын
Really impressive! I never expected to see the long division algorithm again in my life, though. I assumed it had been consigned to history, replaced by 'press ÷'. For really long multiplications Lori Miller used FFT convolution in Excel with success. That just speeds the calculation up.
@DimEarly
@DimEarly 4 күн бұрын
If you never expected to see the division algorithm again, I certainly never expected to see someone implement FFT-optimized multiplication in Excel - that's very cool!
@cashewABCD
@cashewABCD 7 күн бұрын
Great presentation. Great solutions!
@valeriebs1
@valeriebs1 8 күн бұрын
how can i combine a headcount model with a revenue model? Im thinking about how to model a P&L, with a accurate estimate for payroll, considering that with revenue variations we must have payroll variations + hiring and layoff costs.
@DimEarly
@DimEarly 4 күн бұрын
It depends a lot on the business logic. There are cases where the headcount will be an output of the financial model (i.e. since we expect to have this much activity, we'll need this many people to support it), and there are cases where the headcount is more of a driver, like SaaS for example (i.e. we'll hire X salespeople at these times, expect them to generate Y volume of leads, which translates into this big-picture financial performance). It sounds like you're looking more for the former. Aside from 'the obvious' (by which I mean having the level of activity drive the headcount in a sensible way), the next big thing to think about is your logic for smoothing. For example, if your revenue is seasonal, your model might predict that headcount will go up and down a lot, but depending on the business that might or might not make sense (do you have a lot of uncommitted contractors, or do you need to reduce permanent headcount, and if so is it worth the restructuring costs if you expect business to pick up again in a few months, etc). Which is all a long way of saying 'it depends'. This is a big topic!
@nemoyatpeace
@nemoyatpeace 9 күн бұрын
During live I only made it through subtraction, partly because I enjoy one cell formula lambdas too much! But, I've been working on my own lambdas for the multiplication. I didn't know about GROUPBY and tried this for my multiplication, the formula isn't complete yet as the SUMIF doesn't work properly: =LAMBDA(a,b,LET(firstNum,revDigits(a,,,,TRUE),secondNum,TRANSPOSE(revDigits(b,,,,TRUE)),product,firstNum*secondNum,place,SEQUENCE(LEN(a))+SEQUENCE(1,LEN(b)),places,UNIQUE(TOROW(place)), ans,SUMIF(place,places,product),ans))(G152,H152) revDigits is taking the number and returning an array in reversed order. Is there a way to make this SUMIF work, or does it just not work in a big formula like this. If I separate it out into different spots on the sheet, the SUMIF works fine. Thanks! PS - just tried using GROUPBY and realized that it is Beta only for now. Time to upgrade my channel!
@nemoyatpeace
@nemoyatpeace 9 күн бұрын
As a python programmer, I'm quite annoyed that I didn't even consider doing the python solution. (Though I just realized that my new computer wasn't signed up for the beta version so it wouldn't have worked anyway.)
@DimEarly
@DimEarly 4 күн бұрын
I have Python in Excel, but it also didn't occur to me until someone mentioned it later... then I felt a little sick! 😂
@ExcelWizard
@ExcelWizard 9 күн бұрын
Thanks for all brillant stuffs you provide. 😍😍 I love the accum Lambda that handle both add and subtract . I also love the diagonal sum for Multiply. I will apply both to my Lambda. And, Big Yes. I'm IN.
@HadynWiseman
@HadynWiseman 10 күн бұрын
Damn those lambdas are impressive, although I can somewhat read and understand them I would struggle to be able to write something like that in 30 mins because it would take me far too long to figure out the logic! Cases like this are so good for improving though as it forces me to learn something new. Very good explanations of how your solution all works.
@DimEarly
@DimEarly 4 күн бұрын
Haha - this comment is weirdly good timing - I've just started a video series on how to write LAMBDAs! : ) It's going to start off pretty basic, but my hope is to go all the way through to quite advanced stuff...
@HadynWiseman
@HadynWiseman 4 күн бұрын
@@DimEarly awesome, as always I'll be watching!
@HadynWiseman
@HadynWiseman 10 күн бұрын
Ok I'm at 6 mins and have just seen the python solution. After spending considerable hours today trying to figure out carrying values in multiplication and iterating etc that is insanely frustrating! Live I did try python but typed like an excel formula which obviously didn't work!
@Nicolas-gt9qf
@Nicolas-gt9qf 10 күн бұрын
This is indeed shocking to see how python makes it easy.
@daviddleon9127
@daviddleon9127 10 күн бұрын
Second Like 😅😂
@DimEarly
@DimEarly 4 күн бұрын
😂
@Harryjackgross
@Harryjackgross 10 күн бұрын
First like 🎉
@Harryjackgross
@Harryjackgross 10 күн бұрын
I am speeeeed
@DimEarly
@DimEarly 10 күн бұрын
😂 🏎️
@HadynWiseman
@HadynWiseman 15 күн бұрын
I didn't know you could index match into an array result! Good to know
@Reduce_Scan
@Reduce_Scan 16 күн бұрын
Please link of the case
@DimEarly
@DimEarly 15 күн бұрын
There’s a link in the video description. You can download it from here: theexcelements.files.wordpress.com/2022/12/excel-challenge-input.xlsx
@zulhairibaba
@zulhairibaba 16 күн бұрын
=LAMBDA(income,taxTable, LET( tblMin,INDEX(taxTable,,1), tblMax,INDEX(taxTable,,2), tblRate,INDEX(taxTable,,3), MAP(income,LAMBDA(x,LET(a,tblRate*((SORT(IFERROR(--tblMax,x)))-tblMin),MROUND(SUM((a>0)*a),0.05)))))) or =LAMBDA(income,taxTable, MAP(income,LAMBDA(x,LET(a,INDEX(taxTable,,3)*((SORT(IFERROR(--INDEX(taxTable,,2),x)))-INDEX(taxTable,,1)),MROUND(SUM((a>0)*a),0.05)))))
@KlinAprimora
@KlinAprimora 16 күн бұрын
Thanks, Dim! Glad you liked it, cause you tried like, EVERY case there is, right? hahahah Trying my best to make some fun cases! Thanks again for trying it and sharing it!
@DimEarly
@DimEarly 16 күн бұрын
Haha - yeah, there's not much I won't try!
@viktorasgolubevas2386
@viktorasgolubevas2386 16 күн бұрын
Dollar-to-dollar "method" but not for millionaires :)) =SUM(XLOOKUP(SEQUENCE(B1)-1, A4:A10, B4:B10,,-1))
@GregHingsbergen
@GregHingsbergen 17 күн бұрын
One other thing re. the time spent improving a process... time spent improving one process also helps you make other future process improvements faster as well. It's process improvement improvement.
@DimEarly
@DimEarly 16 күн бұрын
Yes! I agree 100%. If you automate 10 processes in a way that takes more time than you save every time, the investment in your skills can still have a very high pay-off over your career.
@IvanCortinas_ES
@IvanCortinas_ES 17 күн бұрын
Excellent solution. Thank you.
@peterbartholomew7409
@peterbartholomew7409 17 күн бұрын
The problem of graduated tax bands or, equivalently, that of banded commission rates is interesting because it admits array solutions that are not based upon past methodology. Operations like sorting and array shaping can be more than a presentational device; they can form a key element of the solution. In the present case, you form a 'high end of bracket' followed by the 'actual income'. Were you then to sort the income into place within the upper bounds, the entire calculation would follow without further tests on sign. =LAMBDA(thresholds, taxrate, [breakdown], [bandName], LAMBDA(income, LET( band, IF(ISOMITTED(bandNname), VSTACK(0, thresholds), bandNname), lower, VSTACK(0, thresholds), upper, SORT(VSTACK(thresholds, income)), split, upper - lower, txDue, split * taxRate, brkdn, HSTACK(band, taxRate, split, txDue), total, HSTACK("Tax due", "", "", SUM(txDue)), IF(breakdown, VSTACK(brkdn, total), SUM(txDue)) ) )) There is extra complexity because the function may be set to provide a simple result or a breakdown by band and is set to accept text descriptions of the bands (eg "Supertax"). I have also partially Curried the function so that it will process an array of incomes using MAP. I make no attempt to achieve brevity; for me there are no prizes for brevity. In fact, when I get back to development, I will probably at least double the formula length with a change control block, error trapping and help. I also think I exercised poor judgement in using the thresholds that are 1 fewer than the bands (0 would have helped). One can't win them all!
@DimEarly
@DimEarly 16 күн бұрын
I like it - very neat! I’m a big fan of having a condensed vs detailed output mode like you do here. I think we’re mostly on the same page about formula brevity - I don’t go for brevity for the sake of it (e.g. I use descriptive variable names and white space for readability), although I also don’t like to ‘waste’ space by laying out more steps than are necessary to be able to follow the flow.
@drkazza5533
@drkazza5533 17 күн бұрын
Genuinely flushed 15 mins down the bin this weekend doing exactly this. Then i wrote an overly complicated lambda 2 days later. Very impressed with @softwaretrain 's one also
@Softwaretrain
@Softwaretrain 18 күн бұрын
=SUM((B1>A4:A10)*(B1-A4:A10)*(B4:B10-N(B3:B9)) =LAMBDA(income,brackLow,rat, SUM((income>brackLow)*(income-brackLow)*(rat-DROP(VSTACK(0,rat),-1)))
@DimEarly
@DimEarly 18 күн бұрын
Nice! Much simpler than mine.
@nytsiory
@nytsiory 18 күн бұрын
We have tax laid out like this too in Madagascar, so we've been digging quite a bit already on how to best calculate it. Here's our best version: Suppose the lower bounds are: 0, 10000, and 20000 The respective rates are: 10%, 15%, and 40% The income tax would then be determined by: =SUMPRODUCT((income - {0,10000,20000})*(income > {0,10000,20000}) * {0.1,0.05,0.25})
@DimEarly
@DimEarly 17 күн бұрын
Very clean, I like it! I think if I were building this in a ‘real’ model, I’d probably add another column to the table with the total tax paid in all the brackets below that. Then you can do all the calcs from a single row - just find the highest band that the income gets into, and add (income - lower bound) * rate to the tax from the earlier bands.
@mohammedbaydoun9464
@mohammedbaydoun9464 18 күн бұрын
looking forward for the videos of Lambda!
@excelrobot
@excelrobot 18 күн бұрын
Beautiful example of turning a common calculation into a reusable Lambda. Having an arsenal of lambdas available is quickly becoming the key to being competitive in Excel, not only for FMWC cases, but in life/work in general!
@DimEarly
@DimEarly 18 күн бұрын
I have mixed feelings about whether that's a good thing for the competitions, but I definitely agree with you about the real world - there's a definite edge to be gained!
@TJ-tb3xm
@TJ-tb3xm 18 күн бұрын
Thanks! A little over my head but worth learning and struggling through! Looking forward to the lambda series.
@DimEarly
@DimEarly 18 күн бұрын
Don't worry, the LAMBDA course is going to start at a gentler pace : )
@TJ-tb3xm
@TJ-tb3xm 17 күн бұрын
@@DimEarly Thank you! That is very encouraging! Looking forward to it!
@jms493
@jms493 24 күн бұрын
When I load my data it is painfully slow. loads like 10K rows per 10 secs and I need to load 13M. Yours loaded so fast....how?
@DimEarly
@DimEarly 24 күн бұрын
It might be because of the file type. CSV is quite fast to load, xls files are slower. That still sounds very slow though, so could be an issue with your computer.
@philippebrillault1140
@philippebrillault1140 25 күн бұрын
Thanks for the introduction. I would like to point out 2 interesting things about the "Excel REGEX engine": 1. It supports local implementations, which means that "\w" corresponds to the set "[A-ZÀÂÆÈÊÔŒÛa-zçàâæéèêëïîôœûùüÿ0-9_]" in French, which is absolutely fabulous! 2. To test it, set REGEX101 "flavour" to "Python". I suspect this is also true for Spanish, German, etc., but I can't test it. If other people can testify?
@DimEarly
@DimEarly 21 күн бұрын
I didn’t know that about localization - interesting! I’ll have to test if it matches those characters on mine. Honestly, I’m torn between thinking this is very cool (it is) and worrying about the implications for file sharing if the result of a formula depends on which user opens the file. Also, the regex flavor in Excel is PCRE2, which I believe is quite a bit jazzier than the Python one (e.g. it can do conditional replacements).
@IvanCortinas_ES
@IvanCortinas_ES 25 күн бұрын
That's caviar. Thank you!!!
@grandgousier
@grandgousier 26 күн бұрын
I know you said it was inelegant, but I am blown away by the simplicity of CONCAT(IF(map1=x,map2,""))
@DimEarly
@DimEarly 22 күн бұрын
Haha - I guess it is kind of elegant in a way... it's certainly concise! I'd prefer something that could take the whole array as an argument, but no point letting the great be the enemy of the good : )
@Harryjackgross
@Harryjackgross 26 күн бұрын
Informative & useful as always! For the bracket stuff, if you want to do infinite bracket and bracket rules this violates the pumping lemma so regexand you need a language of CNF or equivalent strength - although this is worth checking as a that might just be DFAs (but off the top of my head it is all regular languages) For this specitic case where you want just a single pair you can just do an or of (123) and 123
@DimEarly
@DimEarly 22 күн бұрын
It's great how much you can learn in an afternoon of googling a new topic, but it's also good to have someone who actually knows what they're talking about to chip in now and again! 😂
@Harryjackgross
@Harryjackgross 22 күн бұрын
@@DimEarly Re-reading this perhaps I should have proof-read it 😂 I've checked now and indeed regex is a regular language so due to the pumping lemma you can't have infinite matching brackets, but can get finitely many with lots of OR!
@jldocherty
@jldocherty 28 күн бұрын
Awesome as always, and reference to previous comment by HadynWiseman I am a 'purist' like Diarmuid but lack the experience and skill to always use those methods. At 19'38 can you confirm what was used to 'fill down' the answer for the other questions - thanks as always!
@Navie05
@Navie05 27 күн бұрын
What Diarmuid used here is a data table. The hotkey strokes are ALT-D-A-T (successively).
@michaelbrown8821
@michaelbrown8821 29 күн бұрын
That is a mind-boggling use of lambdas to solve as well s making them more efficient. I'm curious how often you use recusion in your work? And when did the evaluate box start working for let formulas? Is that in the insiders channel still? Regardless, amazing s always Diarmuid.
@DimEarly
@DimEarly 22 күн бұрын
I'm not sure I've ever used recursion in my work - definitely not a recursive LAMBDA (although I haven't done all that broad a set of work since I learned how, so that's not as strong a statement as it might seem...). And if the formula evaluation box didn't work for LET, I didn't realize! It does struggle with some LAMBDA stuff - if you need something more powerful for that, there's a similar tool in the Advanced Formula Environment plug-in that was made recently and works with (at least some) LAMBDA stuff. Charles Williams also has a LAMBDA explorer that I've heard good things about (but haven't used myself).