Power Query Running Count Based on Row Condition - Excel Magic Trick 1588

แชร์
ฝัง
  • เผยแพร่เมื่อ 21 ก.ย. 2024

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

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

    Hi! I learned a lot from you about Excel. I moved to Power BI in 2015 and kind lost track of your videos. It is wonderful to know you also teach Power Query. The thing I found most amazing about the way you teach is not only your knowledge about the topic, but the creativity an logic of the construction of your functions and expressions. It really made a difference in the way I think about code and formulas. Thank you for your contribution!

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

    Mike, what I would do without you? Every time I need excel/power query idea - I find you! 🙏

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

      Glad to help, FRANKWHITE1996 : ) : )

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

    Alternatively index can be added within grouped table: = Table.Group(#"Changed Type", {"Product"}, {{"Grouped", each Table.AddIndexColumn(_, "Index", 1, 1), type table}}), which needs to be expanded

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

      Much better way to do it! Thanks for that awesome tip from you and Bill Szysz : ) That will be tomorrow's video!

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

      You don't use bufferredTable?

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

      @@excelisfun Hi Mike Mr ExcelIsFun. today at work I struggled with something based on this video.
      1. My product column is numeric (Fixed Assets numbers)
      2. My transaction Column - did not have it but added index Insted .
      Here everything workedas intended.
      now the 3rd part.
      I had 1 more column with mixed data Containing "New:" and "Old:" and some other descriptions that are not important.
      What I struggled with is to do that running total not only per asset and index (as you did here) but also by either new or old text and do not count when there is different value in that3rd column (null value in such case).
      Any chance you could help?
      More info: the New / old parameter are simple info about Fixed asset change (like qty, description, values etc, any change to an asset) and Ineed to count how many changes there were to 1 specific asset.

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

      i love you, Vida!

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

    Hey i like yo say tankyou, from Colombia... I needed this transformation for a data model in Power BI. from this moment I will review all your M code videos...
    Many thanks again.

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

      Glad you like my videos. Here is a video that goes over M Code basics: th-cam.com/video/NS1AvfV9BeI/w-d-xo.html
      Here is the full playlist: th-cam.com/play/PLrRPvpgDmw0kuIuvn2rCQI14AthSZ43ca.html

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

    Power Query, the number 1 package from Microsoft, Thanks You

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

      Power Query IS pretty amazing!!!!! Thanks for stopping by, Ogwal!!!

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

    Mike. This is exactly what I needed before continuing with the 365 MECS 04. So grateful!

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

    I couldn't believe it when I hit enter and it worked, thanks one again, I could have done with a bit more theory regarding 'why' especially variables and go to operator. I speak as someone relatively new to M code.

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

      My free classes here at TH-cam set up all the theory. Here is Video #9 in the MSPTDA class that has all the theory: th-cam.com/video/NS1AvfV9BeI/w-d-xo.html

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

    You Sir, are my new favourite person! Half a day searching for an answer that I followed in less than 30 minutes.

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

      Glad to help : )

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

    Thanks for your reply, I got up to 8 in MSPTDA, and then decided to have a break and refresh of what I'd learned. 😊

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

    You taught me a lot about power query than any one book 📕 keep up the good work Sir
    You rock !!

  • @nourreldeenmohamed367
    @nourreldeenmohamed367 5 หลายเดือนก่อน +1

    The legend of excel ❤❤

    • @excelisfun
      @excelisfun  5 หลายเดือนก่อน +1

      This method is slow on big data. But the multiple step process can avoid the slowness: th-cam.com/video/camNMc1zaBc/w-d-xo.html

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

    Wow Mike.. super!! Makes me appreciate the beauty and simplicity of worksheet functions, but at the same time, the pure power of M Code.. and your wizardry in using it!! Will definitely be spending some time in MSPTDA in the future. Thanks and Thumbs up!!

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

      You are welcome, Wayne! I agree that sometimes the Worksheet formulas are easier : )

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

    You just saved my life, been searching for an answer to this problem for days, and only found complicated solutions.... Thanks!!!! My table is a little big, can i buffer only a few coluns? that will make it lighter to calculate....

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

    amazing, thousand thanks to you! Just exactly what I am looking for. Excel is flexible but to work with large data, pivot power is much stronger tool.

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

      Glad the video helps!

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

    Thank you Mike... Awesome
    I had to watch it 3 times before I'm able to do it

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

      You are welcome!!!! Practice many times and you can get good. That is how I do it too : )

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

    Brilliant. I was just thinking where do I get started with the syntax and you mentioned them right at the end. Thanks Mike.

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

      Yes, it is best to watch videos 3 - 12 to get the full picture of Power Query and M Code, but video #9 is the hard core M Code video: th-cam.com/play/PLrRPvpgDmw0ks5W7U5NmDCU2ydSnNZA_1.html

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

      Please help support the free resources that I post Alex Kim, your your comments and thumbs up on each video that you watch and of course your Sub : )

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

    YOu are really great, what if instead of counting rows i would need to sum them? thanks

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

    Hi! This is exactly what I need right now. Thanks a lot for this amazing video!

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

    That was exactly my problem!
    Thx

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

    Works great for small sample but takes so much time for big samples ( 160k rows)

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

      Yes, that is true : (

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

      ExcelIsFun do you know of there is any alternative to do it on big samples ?

    • @hudzaifahhudzaifah-zv6yw
      @hudzaifahhudzaifah-zv6yw 11 หลายเดือนก่อน

      ​@@gregoirebertrand5787Hi bro, did you get the alternative ways?

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

    Super understandable explanation!🙏🙏🙏

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

    Thank you

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

    Fantastic!

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

    Brilliant, Mike! As always. :)

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

      Always glad to help : )

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

    Somehow I missed this video when it came out. Thanks for for the great explanation Mike. This solution will be useful for sure.

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

      Glad you found it now! But with all single cell Power Query solutions, be careful on big data sets, cuz it might be slow : (

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

    magic 🙌

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

    WHAT ???!!! ..... WOW ....i'll go directly to your MSPTDA ....thanks Mike

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

      MSPTDA is good : )

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

    power query magic from excelisfun.....Excel-e-lent! thanks mike.

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

      Thanks, Doug!!!!! Glad it is EXCELlent for you : ) : ) : )

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

    Great video! Just saved me a ton of work lol. I'm just wondering how I put an if statement before all this. Like just return the count IF PRODUCT = Quad.

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

    Hi, extremely helpful video, thank you!

  • @hudzaifahhudzaifah-zv6yw
    @hudzaifahhudzaifah-zv6yw 11 หลายเดือนก่อน

    Hi Mike. Thank you for the tutorial. I have tried your step in my 23000 rows, but it take super long time to load the data. Why it happen?

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

    Beautiful video. Thanks Mike for the awesomeness.

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

      You are welcome, Syed : ) : )

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

    You again mike! Thanks A LOT!
    one question, how d I do this in Power BI (not PQ)? Could not find any solutions on web.

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

    Very good, i am searching this thing

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

    Thank you for the variety of the magnificent Excel fun Mike 🤗

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

      You are welcome for the variety and magnificent fun, Katerina!!!!

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

    Amazing..

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

    Thank you Mike!

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

    Amazing! PQ is so much different from Excel... And getting easier and easier with intelli sense ;)

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

      Yes, the intelli sense does help : )

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

    Amazing, thank you!

  • @zbatevp-vlogs610
    @zbatevp-vlogs610 4 ปีที่แล้ว

    Ive beennlooking for this all my life!!!! hahaha. thank you very mucho!!!

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

    Beautiful as always! Thank you!
    Now I’m gonna predict the DAX version:
    - we’ll use a local variable in the formula (“to buffer the table”),
    - we’ll use 2 nested contexts and use the EARLIER()-function.
    At least: that’s the analogy I see.
    BTW: I can’t help but think: déjà vu. Thanks for the reminder.
    BTW2: You do add these videos to the right playlist, right? I mean: this one belongs in the PQ-M playlist.

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

      LOVE your DAX, Variable to Buffer, EARLIER - just too cool : ) Yes, I try to add them to the correct playlist, but it is just perfect timing becasue today I DID forgt to add them to the correct playlist!?!?!? You are telepathic!!! I just added them to ETM, PQ, PQ Custom Functions.

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

      Thanks for being such a great Teammate!!!

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

      Mike, just like the previous time where you used these nested functions to do a little running total exercise that I requested at the time, you apply the same PQ-M logic here. That really is PQ-M on the next level, especially with that buffered table for efficiency.
      My PQ-M, although nicely structured in terms of queries, is usually on a previous level (one level down) from what you did here.
      Furthermore: your solution is just awesome because of its compactness and computational efficiency, and that in a context of “running total” (or equivalent), usually a more complex thing to compute in M or DAX.
      You really transcended that concept of expandable ranges from Excel Classic to the Power Tools.
      As a technique that is very powerful and thus useful. I’m sure we’ll be seeing this more often in the future, because it has become a new tool in our toolbox.- just my 2 cents.

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

      @@GeertDelmulle Thanks, Teammate Geert! Via Bill Szysz, there may be an even better way. Maybe a new video tomorrow or the next day : )

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

      What?!? Can’t wait to see that one!...

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

    Thank you very much for this video!
    But i have a little question.
    What if i only want to show certain columns in the ,,inside table‘‘?
    I have a table with over 20 columns, and i think that it would might help to improve the performance, if i only selected to column which is needed for this calculation

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

    Cool stuff, i think it works only if the first parameter is a number, I’ll have to test it if all the columns are text. Probably need to add an Index column

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

    I know its its an old video but I was re watching and for fun thought I would try to do it another way with out merging and selecting rows line by line and came up with this, its more complicated but it was fun and helped with my learning:
    let
    Source = Table.FromRows(
    {
    {"1023","Quad"},
    {"1024","Carlota"},
    {"1025","Quad"},
    {"1026","Sunshine"},
    {"1027","Aspen"},
    {"1028","Aspen"}
    },
    {"ID","Product"}),
    LB_Transactions = List.Buffer(Source[ID]),
    LB_Product = List.Buffer(Source[Product]),
    Count = List.Count(LB_Product),
    R_Count = Table.FromRecords(
    List.Generate(
    ()=> [I=0,ID=LB_Transactions{0}, Product=LB_Product{0}, R_Count_List={LB_Product{0}},R_Count=1],
    each [I] < Count,
    each [
    I=[I]+1,
    ID=LB_Transactions{[I]+1},
    Product=LB_Product{[I]+1},
    R_Count_List=[R_Count_List]&{LB_Product{[I]+1}},
    R_Count=List.Count(List.Select([R_Count_List]&{LB_Product{[I]+1}},(R)=> R = Text.From(LB_Product{[I]+1})) )
    ]
    )
    )
    in
    R_Count

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

    Fantastic Video

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

    thank you. It is so helpful

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

    This is so close to what I am looking for! All your videos are great and easy to follow. What I am looking for is is DAX for a calculated column compatible to COUNTIFS(CATEGORY, ""&"",ENCOUNTER#,ENCOUNTER#,SALESPERSON,SALESPERSON). Can anyone provide insight?

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

    Here is a (simple?) alternative (from the Change Type step):
    #"Grouped Rows" = Table.Group(#"Changed Type", {"Product"}, {{"Data", each _, type table [#"Transaction No."=nullable number, Product=nullable text]}}),
    #"Added Custom" = Table.AddColumn(#"Grouped Rows", "DataWithIndex", each Table.AddIndexColumn([Data],"Index",1,1)),
    #"Removed Other Columns" = Table.SelectColumns(#"Added Custom",{"DataWithIndex"}),
    #"Expanded DataWithIndex" = Table.ExpandTableColumn(#"Removed Other Columns", "DataWithIndex", {"Transaction No.", "Product", "Index"}, {"Transaction No.", "Product", "Index"}),
    #"Sorted Rows" = Table.Sort(#"Expanded DataWithIndex",{{"Transaction No.", Order.Ascending}})
    in
    #"Sorted Rows"

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

      Yes, that is great, Jan Willem!!! I added your code to download workbook. Thanks for helping out the Team : )
      Here is the final code (I think we have to sort at the very beginning too):
      let
      Source = Excel.CurrentWorkbook(){[Name="ProductStartTable"]}[Content],
      #"Changed Type" = Table.TransformColumnTypes(Source,{{"Transaction No", Int64.Type}, {"Product", type text}}),
      #"Sorted Rows" = Table.Sort(#"Changed Type",{{"Transaction No", Order.Ascending}}),
      #"Grouped Rows" = Table.Group(#"Sorted Rows", {"Product"}, {{"AllRows", each _, type table [Transaction No=nullable number, Product=nullable text]}}),
      #"Added Custom" = Table.AddColumn(#"Grouped Rows", "RunningCount", each Table.AddIndexColumn([AllRows],"Running Total",1,1)),
      #"Removed Other Columns" = Table.SelectColumns(#"Added Custom",{"RunningCount"}),
      #"Expanded RunningCount" = Table.ExpandTableColumn(#"Removed Other Columns", "RunningCount", {"Transaction No", "Product", "Running Total"}, {"Transaction No", "Product", "Running Total"}),
      #"Sorted Rows1" = Table.Sort(#"Expanded RunningCount",{{"Transaction No", Order.Ascending}}),
      #"Changed Type1" = Table.TransformColumnTypes(#"Sorted Rows1",{{"Transaction No", Int64.Type}, {"Running Total", Int64.Type}, {"Product", type text}})
      in
      #"Changed Type1"

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

      BTW, Vida and Bill Szysz also suggested this : )

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

      Also, the next video, Power Query Running Count with Grouping & Add Index - Excel Magic Trick 1589, th-cam.com/video/camNMc1zaBc/w-d-xo.html, shows your trick : )

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

    Thank you very much Sir

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

    Thanks a million Mike. Great video.
    Is there a way to sum instead of count. I only see List.Sum (which won't work here as its a table I think).
    I want to calc a cum total per department in a table.(Sum one Col in a table). All I need is the total per department for every department repeated for every row.

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

    Hi Mike
    Amazing thank you for your great tip.
    Could you advise us how to do this in power bi?
    Thank you

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

    Mike, what an amazing video!!! Thanks to sharing this.

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

      You are welcome, Karoline!!!

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

    Great One Mike. Beautiful Staff. :) :)

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

      Thanks, John Borg : ) : )

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

    Mind blown. Thank you!

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

      You are welcome, Most Awesome Excel Sister!!!!! The next video is an even better way to do this : )

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

      @@excelisfun OMG Can't wait to see the next one. This topic was so perfectly-quantumly timed.. was just trying to do COUNTIFS in PQ last week and now you've saved meeeeeee!!!

  • @GC-lu6en
    @GC-lu6en 4 ปีที่แล้ว

    Impressive Video

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

    Can you tell how to implement counif(A:A, A1) in power query please?

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

      Just use the Group By button. :-)

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

    Thank you so much!!!

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

    This is brilliant. Could have used this a long time ago

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

      Glad it is here now for you, Donovan!!!! Thanks for your support : )

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

    Very Useful. Thx

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

      Glad it was helpful!

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

    How do you do this with 70k plus unique rows of data to cross reference?

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

    Nice video Mike!

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

      Glad it is nice for you, Chris : )

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

    Hi, Could you help me through something like this but for SQL, the problem is that I have more than 2 million lines in the table and power bi does not work

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

    I Tried it, after adding Custom Column I add two References to IT and OT. After it I couldnt see the list but functon on each row . And it says : "function (OT as any) as any"...it isnt possible make here list } not function?
    = Table.AddColumn(BufferedTable, "Count", each (OT) => Table.SelectRows(BufferedTable, (IT) => IT[Reference]&[Item]

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

    Imbelivable mike :) no comment briliant

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

    Hi, Thanks for this share. But when I apply this on a data of 10K+rows, it takes a lot of time to load in to excel. Any help on this?

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

    Thanks for the video..

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

      You are welcome, aditya!!!!

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

    I just figured a way to do this with out the big formula based on your count if by grouping Video. I started by duplicating the the Query that I wanted to count. Then transformed it to have the Group count. Then Merged in back with the original table to a new table which had the count in a separate Column. Seems to work well?

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

    Thanks Mike

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

      You are welcome, Dave!!!!

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

    Sir I have one question Row basis condition=if(A2=A3, 0,1) row basis all down line how to apply this formula

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

    Beautiful logic in M language :-)) Thanks.

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

      Thanks, Teammate, Bill "Mr Power Query" Szysz : ) : ) !!!!

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

    Can this countif be done counting the whole column since the first table and not only the current and past items in the sorting?

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

    Incrível!!! Muito obrigada me ajudou muito!

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

      Ola, boa tarde!
      Consegue me explicar, estou precisando muito fazer essa formula

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

    Sir,
    How to do this same thing in Power BI..

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

    Please explain same function in VBA

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

    I use Dax but M confuses me!! But this was great! 👍👍 Keep such stuff coming Guru!! 👍👍

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

      Glad it helps, Shashikant!!!!

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

    Could anyone help me?
    While typing any formula, help screen is not coming?? why?

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

    Great Mike. :)

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

      Thanks for your consistent and amazing support, John Borg : )

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

    Same formula I want to run in power query
    Formula is- =1/Countif(A:A,A2)
    How to type this formula in power query
    Pls must reply...

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

    I was really hoping this would be a solution for something I'm trying to do just like that. I followed the steps exactly and when I got to this part: = Table.AddColumn(BufferedTable, "RunningCount", (OT) >= 1), PowerBI gave me, "Expression.Error: The name 'OT' wasn't recognized. Make sure it's spelled correctly." Can't continue :(

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

    Hi! my data cannot be converted as 'number' as it is 10203040-10, 10203040-20 and so on. Therefore, I need to keep the data type as 'Text'. How can I use this formula in power query for Text Type?

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

    Hi Mike,
    How do you group by a column that is date data type and group it per month (e.g. counting the number of transactions per month)?
    thanks in advance :)

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

    Hi! How can I add another criteria (in addition to Product) to this formula? I tried using "And" but that didn't work..

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

    Funny how one of the easiest Excel formulas is one of the most difficult things to do in PQ

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

    Thanks Mike. I was able to follow along and reproduce what you did, but, my Intelli-sense is not working in my version of Power Query. Is that only available in 365?

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

      Yes, in Office 365. Office 365 is THE only version going forward, you know that right?

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

    Thanks, Mike for this amazing tip, but M Code operator IT and OT completely went over my head, could you please elaborate more? is there a detailed article or book I can refer to?

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

      Did you see the video link at the end of the video? For more about M Code #9 video in the MSPTDA class: th-cam.com/video/NS1AvfV9BeI/w-d-xo.html for another video about variables like IT and OT: th-cam.com/video/4yCdOfvmJWc/w-d-xo.html

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

    Here is may take on getting Running Count once the list is sorted using List.Generate:
    th-cam.com/video/Zg6CpZ12JY4/w-d-xo.html

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

    Great one mike.... But how to handle this if we dont have "transaction no" column

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

      I do not think there is a way. As I mentioned, it makes no sense unless there is an order. If there is an order, but no marker like date, time or translation number, you could add an index, but if the external data does not have that marker and someone changes the order, it become meaningless.

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

    If I have one Row with 20 cells , and second row with 20 and I need merge the second row cells every tow cells only ,,, help me If you can please

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

      I do not undestand your question. I am sorry.

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

      For back and forth dialog try: mrexcel.com/forum

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

      @@excelisfun I have about 170 rows (85 Bank , 85 filled) and 7 Columns , and i need to merge every tow rows (one blank with one filled) in easy way ...

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

    M code language is so difficult to remember

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

    Fearful for me 😨😱

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

    the name (OT) was not recognized. Full stop.

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

    MTD,LM,L2LM,YTD,LYTD
    This format retail company mis report
    Plz create excel report this format

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

      I have no idea what you are asking...

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

      For back and forth dialog try: mrexcel.com/forum