Write Your First CUSTOM M FUNCTION in Power BI

แชร์
ฝัง
  • เผยแพร่เมื่อ 30 ก.ค. 2024
  • In this video I show how to write your own custom M FUNCTIONS in Power BI. It will enable you to do work more efficiently in the query editor (Power Query).
    Download file here datatraining.io/powerbi-how-to
    --------------------------------
    📊 TRAININGS 📊
    ---------------------------------
    Power BI Design 4 Weeks Transformation Program my.datatraining.io/pages/powe...
    Power BI Essentials datatraining.io/powerbilearni...
    Business User Training datatraining.io/powerbi-busin...
    For Custom Trainings and Consulting email directly support@datatraining.io
    ---------------------------------
    ⏱️ TIMESTAMPS ⏱️
    ---------------------------------
    0:00​ Intro
    1:08 Write your first custom M Function
    2:35 Different ways to invoke a function
    3:46 Assigning a data type to the input parameters
    4:43 Adding multiple input parameters and transformations
    7:48 Understanding how Power Query executes M Functions
    9:14 Are M Functions really necessary?
    11:12​ End
    ---------------------------------
    😍 JOIN 😍
    ----------------------------------
    Join bit.ly/4b453bi
    Subscribe bit.ly/31MnQGO​
    Insta / howtopowerbi
    LinkedIn / basdohmen
    TikTok / how.to.power.bi
    X / howtopowerbi
    fb / howtopowerbi
    Threads www.threads.net/@howtopowerbi
    Newsletter datatraining.io/newsletter
    ---------------------------------
    👇 CHECK THIS OUT! 👇
    ---------------------------------
    💻 My gear amzn.to/47F21Yc
    📚 Power BI books MUST READ! amzn.to/3tUfFcj
    💡 General books I recommend amzn.to/48YNo33
    🎶 Music for my videos www.epidemicsound.com/referra...
    🚀 For growing on TH-cam: www.tubebuddy.com/bas
    🏄 Stuff I use daily amzn.to/3HqfMQ2
    * Above are affiliate links, which means at no additional cost to you, if you make a purchase using these links we will receive a small commission. It supports us and helps us to continue making more How to Power BI videos!
    Thanks for being a part of this channel and all your support! 💪 🙏
    #HowToPowerBI​ #PowerBI​ #DataTraining​
    #powerbidesktop​ #powerbitraining​ #powerbideveloper​ #DAX
  • วิทยาศาสตร์และเทคโนโลยี

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

  • @elijahphilson8878
    @elijahphilson8878 2 ปีที่แล้ว +4

    This is a very well made video! Crisp explanations, well thought out content, intro/body/conclusion, great editing, and the quiet jazz in the background made me want a coffee all the more! Oh, and to practice writing m functions :)

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

    Hey Bas, the way you explain is just SUPERB, thanks a LOT!!!

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

    Excellent Tip. Make the data model more efficient

  • @AbouAli01006300091
    @AbouAli01006300091 2 ปีที่แล้ว +4

    SUPER SUPER SUPER LIKE!!!!... You made it easy .. I was completely afraid to touch this area but you really made it easy!
    Very well done

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

      Awesome Mohammad :) im very happy you think so!

  • @user-bk8db7ud6k
    @user-bk8db7ud6k 2 ปีที่แล้ว

    Great example, thanks.

  • @malvin74s
    @malvin74s 11 หลายเดือนก่อน

    Right on point! Thank you.

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

    I follow the second group Baz. Very nice video... hats off to you...

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

    Of course I am in the second group as well, this is an awesome example of how custom functions are working! thank you very much for this video!!
    I like your dialect - is this a dutch dialect?

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

    Very useful tip! Thanks for sharing Bas! Love the way you explain ☕

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

    clear, thank you

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

    Good video,iit all looks so eay when other people do it., I find custom function syntax quite tricky, as in.
    ( A , B )=> A + B
    or
    let
    Addup = (A, B ) =>
    A + B
    in
    Addup
    and that's before you start needing nested let / in statements.

  • @SamehRSameh
    @SamehRSameh 2 ปีที่แล้ว +3

    Please create special playlist for m language from beginner to advanced

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

    Absolutely love your videos 👍

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

      Thank you sooo much Shawn :) You made my day

  • @louism.4980
    @louism.4980 2 หลายเดือนก่อน

    Thank you so much, Bas! Love how you've made it so simple! A quick question, is the performance better using custom function? I.e., if I were to refresh the query, will both methods take pretty much the same amount of CPU time? Thanks agian.

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

    Nice trick but……..do you store those functions in a kind of library/repository? E.q how do you make those functions maintainable including the different versions ?
    ?

  • @nagaprasanthsn1184
    @nagaprasanthsn1184 11 หลายเดือนก่อน

    Hello, I have a scalar valued function in SQL. I need to pass SUM of certain columns from Power BI to get a final result which needs to be displayed. May I know how to achieve that?

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

    Excellent Info, Many thanks

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

      thank you very much Charles! 😀

  • @user-ef4oc3vc6r
    @user-ef4oc3vc6r 2 ปีที่แล้ว

    Thanks

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

    Hi is there any to render custom font on client computer without installing that custom font to there pc or laptop .plz show me a way need help 🆘🙏🙏

  • @samirvaghasiya9918
    @samirvaghasiya9918 3 หลายเดือนก่อน

    Thanks :) Very useful

    • @HowtoPowerBI
      @HowtoPowerBI  3 หลายเดือนก่อน

      Glad it was helpful 😃

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

    Very nice video!!
    I prefer the second one 😅👍

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

      hahaha me 2 ;) especially in the morning 😂

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

    7:12 Thinking... How to make second petameter as Optional?

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

    Thanks for a helpful video. Subscribe already.

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

    Hey bro, lets say I have a column with emails. Is it possible to filter by default the data based on who logs in without RLS? Maybe using a calculated table??

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

      tricky one, maybe you could build a table with users / roles / entitlements and create an inactive relation and then active it in your dax measures. I don't know of a more elegant way of solving it.

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

      What you describe is exactly the point of RLS. It's relatively easy. Set up a security role with the email column = USERPRINCIPALNAME(). If the user does not appear in the email list, everything will be filtered out.

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

      Thanks, what Im looking for is more a default filter so users can see other's information but displaying theirs by default

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

    Hi Tks, can you provide a example with multiple tables as parameter.

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

      🙂 yes, will do in one of my next videos

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

    why the M code does not follow a sequential order? I find it hard to understand. thanks!

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

    This is quite confusing for a brand new person and I'd like to advise why instead of just leaving it at that. Every time a new query or function is shown, there is nothing showing how is related to the table. The table already had the 'strength' and 'nrbeans' value, but that wasn't advised of when the functions or invokes were being displayed, therefore I'm trying to understand if when the variables are shown are they referencing the column names from the table or are they new variables. Very lost due to that one detail.

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

    How to add 2 numeric columns using custom column in POWER QUERY EDITOR.

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

    Team Calculeted column

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

    Nice explanation... But do barristas really count the beans?! 😝

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

      haha 😂 , the ones that have seen this video will! Don't be surprised next time you visit starbucks

  • @ousmanesidibe951
    @ousmanesidibe951 13 วันที่ผ่านมา

    thank you in 2024