How to use IF AND OR in Power Query

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

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

  • @notesfromleisa-land
    @notesfromleisa-land ปีที่แล้ว +2

    TH-cam and Wyn, along with other great contributors help me so much when I'm in a pickle. Thanks for keeping me out of the pickle brine!

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

    IF AND OR - Simple but so useful. A good reminder that solutions don't need to be complicated. Thanks Wyn

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

    The way you explain things is amazing and precise.
    Thank you so much for your endless efforts.

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

      Very kind words Kamran, thank you

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

    Wooow, It is simple but comprehensive explnation. Very helpfull content. Thank you.

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

    Perfect - I needed this! I don’t use PQ everyday, so I don’t always remember the basics but I’m getting there, thanks to tutorials like these! I am going to jump over to your website now to check it out! Thanks again for all your helpful content!

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

      You’re welcome Irene. I find myself referring to my own videos and posts all the time 😀. Very hard to remember it all

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

    Thank you very much ,,, i'm following you since two weeks and i'm really too much appreciated your videos and its contents which always coming with a new informations we are really need to know about it such as power query ... so continue and we are supporting your videos... thank you

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

      That's great to hear. Thanks for taking the time to let me know Mohammed.

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

    Clear, precise concise. There is no way to not subscribe after that.

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

    This was so doggone helpful!!! Thank you!!! It's exactly what I was looking for. 🙏🏽

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

      Fantastic, thanks for letting me know it’s useful 😁

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

    Hi Wyn. Thanks for the demo. Also, nice to know about your dummy data.. very helpful when practicing concepts. Thanks for sharing :)) Thumbs up!!

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

      Glad to share and hope it comes in useful

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

    Thanks Wyn.....just tried.....very useful. Kr, Luca

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

    Great share!
    I often forget to add a proper name to a new table, so like you, I added Change Table Name to QAT, under All Commands.

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

    From two weeks I was stuck on finding if 2 dates and time fall between 2 dates and time. and after watching this I have a solution. Thank you

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

      Excellent Urooj, thanks for letting me know!

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

    thank you this is such a life saver

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

      No worries. Thanks for letting me know

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

    Of course thumbs up!! Thank you Wyn!

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

    Thank You. That was really helpful.

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

    Hi Wyn, is it possible for the result of the IF statement in M to be a numerical calculation? Or does it always have to be a text value?

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

      Hi, sure is e.g. IF ColumnX < 10 then Y etc

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

      How about: IF column X > 10 then column X * - 1 ? So the result is a calc (col X * - 1) rather than just the contents of another column or a text string.

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

      @@Metzanine , yep but you have to hand write it via Add Column - Custom Column rather than using the Conditional Column wizard

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

    Hi Wyn, first of all thanks a lot for your videos! They are super helpful, I was considering using Power Pivot in order to do forecasting since having to use so much data and so many formulas in a single excel sheet is making super slow and difficult to work. I was wondering if it would be possible to do forecasting in power pivot considering that I need to calculate values with conditional formating linking cells with each other? My goal is at the end to only have the forecasted values from power pivot and not having all the formulas accross the whole excel sheet.
    Thank you!

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

    Great video, thank you! Can you use wildcards in M? In large datasets like the blood group where it was O+ or O- if the data was manually entered would the query you created pick up an entry if it was just O or O++ because it was a typo? If you could use a wild card and had O* it could pick up anything.

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

      Cheers, you might need Text.Contains powerquery.how/text-contains/

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

    thank you for the video, and yes it was helpful!

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

    Great explanation and also thank you for the fake data set links

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

    Thanks for sharing! 👍

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

    this was great - but i have a question if i need to combine multiple conditions like what if blood type is either b+ or o+ and kg>60 & 50 - so how to frame the query .. i tried adding or and - but it isn't working correctly - may be a video on multiple coniditon and mltiple criteria might help

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

      Hi Nelson, something like if ( [Type] = "b+" or [Type] = "O+" ) and [kg] > 60 then "Met" else "-" You may be missing on the the ( ) brackets to group the conditions

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

      Yes, I was indeed missing the brackets. Thanks for the reply.

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

      You’re welcome

  • @YanlingYang-h6t
    @YanlingYang-h6t ปีที่แล้ว

    How to write if or formula in a power query if there are more than 2 conditions? Thank you.

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

      You might find my new video useful th-cam.com/video/o9qAov3kSN4/w-d-xo.html

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

    Great video Wynn! Can we also do one using the query editor :)

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

      Thanks Christopher. Are you asking if I can do a video explaining the Advanced Editor?

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

      @@AccessAnalytic Hello - I was just thinking of doing a video explaining how to use the Advanced Editor when writing a more complex IF AND OR. Thinking about the M syntax, etc. Thanks!

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

      Hi @@christophermajka623 , if I'm writing IF AND OR formulas that are more complex I still always use the Custom Column box as it gives you the ability to double click the columns you want to reference. I don't think there'd be any advantage in using the Advanced Editor for that scenario

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

    Can we use countif function like excel??

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

      Sort of, using GROUP BY and countrows but normally it's better to do that in Power BI or Power Pivot after loading the data from Power Query

  • @sjdyt
    @sjdyt 8 หลายเดือนก่อน +1

    Thanks 👍

  • @Robert-hb5tc
    @Robert-hb5tc 10 หลายเดือนก่อน +1

    thank you!

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

    Great. Thanks...

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

      Hope it helps a few people starting out

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

    Hi, thanks You solutions, i need much relation about tablet for date, please

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

      Does this video and the link in its description help What is a Date Table / Calendar table in Power BI / Excel
      th-cam.com/video/LfKm3ATibpE/w-d-xo.html

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

    in custom column after typing then.. it shows error!! why!! dnt get it

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

      What error does it show

    • @tanveerabbas3271
      @tanveerabbas3271 3 หลายเดือนก่อน +1

      @@AccessAnalytic i heard you say if with underscore !!!.. was not the case. after spending an hour found learnt the hard way that power query cannot display where the error is...till the mid half it said no syntax error where as the error was right in begining.... thk you bro. grt video though...

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

    Can you do If isblank??