Count Unique Days In Each Month: PivotTable, Array Formula, or Dynamic Array? EMT 1620

แชร์
ฝัง
  • เผยแพร่เมื่อ 13 ต.ค. 2024
  • Download Excel File: excelisfun.net...
    Learn all about how to count unique sales dates for each month. Make a Distinct Count calculations for number of unique dates in each month.
    1. (00:01) Introduction
    2. (00:54) Array Formula using FREQUENCY, SUMPRODUCT & IF Function
    3. (04:22) Dynamic Array using FILTER and UNIQUE Functions
    4. (05:48) Data Model PivotTable and Distinct Count Option
    5. (08:58) Summary

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

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

    Download Excel File: people.highline.edu/mgirvin/TH-camExcelIsFun/EMT1620.xlsx
    Topics:
    1. (00:01) Introduction
    2. (00:54) Array Formula using FREQUENCY, SUMPRODUCT & IF Function
    3. (04:22) Dynamic Array using FILTER and UNIQUE Functions
    4. (05:48) Data Model PivotTable and Distinct Count Option
    5. (08:58) Summary

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

      @@realblacksmith You are welcome! Thanks for helping help with your comments and thumbs ups!

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

      I SALUTE YOU, thanks t you im learning the non standard ways for using some functions! 6:00 like here with the rows, my mind is str8 forward, if anything needs counting i go str8 to count functions, you went for rows...
      Thank you!

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

      @@ExcelInstructor You are welcome for the ROWS fun : )

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

    My vote...Power Pivot! Thanks for the video

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

      Your vote is recorded!!!! I agree : ) : )

  • @richardhay645
    @richardhay645 4 ปีที่แล้ว +6

    Data Model Pivot Tables definitely a major contribution!!

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

      Yes, indeed, Data Model PivotTable to the rescue : )

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

    Awesome Mike!

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

      Thanks, teammate!

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

    I loved that Pivot Table trick. Simply awesome 👍

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

      Yes, sometimes PivotTables will be MUCH easier than formulas ; )

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

    What a way to start my tuesday morning!! Simply Amazing!!! Thanks Mike. :) :)

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

      You are welcome Formula Guy John Borg!!!

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

    WOW! I didn't know about distinct count! Amazing! Thanks for sharing!

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

      Yes, it is a cool PivotTable Tick : )

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

    Thank Mike for this EXCELlent video. Superb.

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

      Glad it is superb, Syed! Thanks for being such a consistent Teammate with your support : )

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

      @@excelisfun you are welcome Mike. An honor to be in your team n at your support.

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

    Thanks Mike...

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

    Awesome Mike! That first formula had me breaking out the Excedrin 😀 !

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

    Thanks Mike!

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

      You are welcome, Dave!

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

    Great solutions!

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

      Thanks, Teammate!

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

    Thank you for making my work easier!! You're the man, Mike!

  • @Al-Ahdal
    @Al-Ahdal 4 ปีที่แล้ว +5

    Excellent as always....

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

      EXCELlent, I think you meant, Syed ; )

  • @robertovelicaz7719
    @robertovelicaz7719 4 ปีที่แล้ว +6

    So useful to know! Thanks Mike 😃

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

      You are welcome, Roberto!!!

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

    You are very talented. You are amazing in Excel, thank you for sharing.

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

      You are welcome for thr Share, Hoi Yin Wan!

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

    What a tutorial mike! God bless you. Thanks a lot.

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

      You aer welcome a lot, Khan!!!

  • @kamranb1369
    @kamranb1369 4 ปีที่แล้ว +5

    Thanks for this useful tip Mike

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

      You are welcome for the tip, Kamran!!!

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

    Thanks, I have addicted to your great tutorials even if I know some of them, I think this is the best way that you choose for every issue provide all of the way for all of version. Thumbs up. Keep following.
    Data model is completely change the world of calculation and we need to concentrate on it more than always.

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

      Glad you like the videos with multiple methods! If youwant to learn more about Excel Power Pivot. check out MSPTDA videos #13-15: th-cam.com/video/uEgFzdx-bhE/w-d-xo.html

  • @drsteele4749
    @drsteele4749 4 ปีที่แล้ว +5

    That's a nice summary, Mike. I have long wondered why the DistinctCount operator is not part of native Pivot Tables.

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

      The Distinct Count is a DAX Function that only lives in Power Pivot Data Model. I wonder too why there never added a Distinct Count, but that decision was made back in early 1990s, almost 30 years ago, when they invented the first PivotTable and SubTotal feature - when they only added 11 aggregate functions, and Distinct Count was not one of them.

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

    another awesome presentation... thanks Mike

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

      You are welcome, Edmundo!!!

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

    Another great video from you, Mike. As I watch new videos as they are released, I may not have an immediate application from what I just watched/learned, but enjoy them nonetheless.

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

      Cool, renegadek9! Even though the skill might not be used right now, it will be in the back of your mind later, and the videos are always here you you later! Thanks for your support, renegadek9!!!

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

    Great comparison of different ways to get the same result. Power Query solution would be Date.StartOfMonth to get 1st day of each month, then remove duplicates from the original dates column and group by start of the month

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

      Cool: Power Query Date.StartOfMonth solution! Thanks, Vida : )

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

    Thanks for the amazing video, Mike! I just encountered this distinct count issue at work yesterday and used power pivot table to get it sorted out. I have never thought to use frequency function....always can learn something new from your video:):)

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

      Yes, we have been using FREQUENCY as the essence for efficient Distinct Count formula for decades. I have a whole chapter just on that topic in my Ctrl + Shift + Enter book : )

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

    Very useful thank you

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

      You are welcome for the trio of usefulness, sadyaz64!!!!

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

    Fantastic Mike! So grateful for your simple videos. In under 10 minutes, I saw the Dynamic Formula I was thinking of, but couldn't crack, and I saw the Power Query solution. I went with the Power Query solution this time!

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

      Glad this helps!!!!

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

    Counting distinct date using Rows function, that's very great, Thanks so much.

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

      You are welcome so much, Ogwal!!

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

    Great video Mike thanks for sharing!

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

      You aer welcome for the share, Graham : )

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

    Pure greatness. Thank You Mike :)

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

      You are welcome, nimrodzik!!!

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

    Thanks a ton Mike

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

      You are welcome a ton, Khalid!!!

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

    Hi Mike,
    Amazing, always learn something new from you.
    Thumbs up 👍

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

      Thank you, Khalid!!!

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

    Merci

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

      You are welcome, Essaid : )

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

    I tried summarizing the data with a pivot table before the video started to see if I could get it; but I couldn't because I didn't know about distinct count. Thank you for showing that.

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

      Good for you for trying it first! You are welcome for the fun times with Excel, N Sanch01!!!

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

    Glad to learn new excel stuff, thanks ExcelIsFun!

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

      You are welcome, orlando!!!!

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

    excellent

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

      Thanks, MAJID!!!

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

    I strongly believe that this exercise might short circuit my brain if I lose focus. On the other hand, it's a powerful mental workout, and I am thankful for it :-D Nice solutions, Mike!

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

      Thank for your not short circuiting, Sandra : ) : )

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

    Thank u so much Mr. Mike this is really fun and useful

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

      Glad it is fun and useful, Ismail!!!

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

    Amaizing Mike, came out with one cell formula (the only thing is we have to introduce 1/1/2019 in cell F42 ) =TRANSPOSE(MMULT(SEQUENCE(1,COUNTA(UNIQUE(Date)),1,0),(UNIQUE(Date)>=TRANSPOSE(F6:F41))*(UNIQUE(Date)

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

      or without helper cell, using EOMONTH with INDEX ..
      =TRANSPOSE(MMULT(SEQUENCE(1,COUNTA(UNIQUE(Date)),1,0),(UNIQUE(Date)>=TRANSPOSE(F6:F41))*(UNIQUE(Date)

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

      Thanks for the alternative formula, cr gr0912!!!

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

    great video mike! , my coworkers told me why we still use formulas the time we can do it with DAX
    I don't know what to say ... the only response I have is the volume of data am I right?

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

      There is not just one answer. You always have to look at 1) the data you have, 2) what the end result is, 3) then decide which tool to use. Generally speaking: Formulas: 1) might be good if you have small data, 2) There are Worksheet functions that you need that are easier than DAX, like Approximate Match Lookup (VLOOKUP or XLOOKUP or INDEX and MATCH) or Standard Deviation (STDEX.S or STDEV.P), 3) you need the solution to update instantly when source data changes. DAX and Data Model: 1) You have Big Data, anything over about 50,000 rows is a candidate for Data Model, 2) There are DAX functions that you need that are easier than Worksheet functions, like DISTINCTCOUNT or AVERAGEX (for daily, month or yearly averages) or even calculations for partial year sales, 3) you don't mind build a Data Model with Data Table and the like, 4) you don't mind refreshing when source data changes.

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

      @@excelisfun clear! 🙂👍

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

    Amazing!

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

      Glad it is amazing for you, Jonathan!!!

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

    Nice to learn how make distinct count with frequencyy thankssss

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

      You are welcome, Mohamed!!!

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

    Nice 💜

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

      Glad it is nice for you, Lamees!!!!

  • @brandonpruitt1366
    @brandonpruitt1366 4 ปีที่แล้ว +5

    Man... The complex array required in older versions of excel is enough to make even the most frugal among us to upgrade

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

      That is well said. And yes, Office 365 has so many advantages, that all entities that want to be efficient with calculations and data analysis, will have to upgrade.

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

      @@excelisfun But where is it? Our company has Office 365 but the new functions are not there.

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

      @@sallyg5hlee636 You have to sign up for Insider: Excel File menu, Account, then Insider : )

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

    Amazing stuff!... Thank you!

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

      You are welcome, Arvind!!!

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

    For me I concentrated more on the power table as its quick and can be manipulated later for other outcomes. But it was g8 to know about filter and unique functions. I have just brought office 365, am eager to use all ur magic trick in office 365.

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

      Yes, PivotTables are usually the easiest! Glad you got Office 365, Santosh!!!

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

    Nice comparison, especially for those who like the legacy formula challenge :) Not sure if this went over my head too fast, but when you put the two IFs consecutively (logical test and if true arguments) in the data array arguement of FREQUENCY, did that work like an AND logical test? If the lower and upper date limits were met then it was returning the dates that fell for that month?

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

      Yes, two IF functions work as an AND Logical Test where it picks out dates between lower and upper limit.

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

      @@excelisfun Cool. I never thought about constructing it like that. I usually put the AND function for something like that.

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

      @@Sal_A We get to learn cool new things each day : ) : )

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

    Dear Mike, I would like to know have you created any video on dashboards creation. It would be of g8 help to me and other teammate's.

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

      I have made amny Dashboard videos. Here is a Playlist with Dashboard Videos: th-cam.com/play/PLrRPvpgDmw0kYt4c50Sg7BXGLBAjiW6VQ.html

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

      OMG, I was thinking of just one but you have already created so many. Right now when I saw all the links I am supercharged to check all video in the link provided and get trained on Dashboard👍. A big thanks for reading and reverting on my request. Excel is fun with Mike girvin. ❤❤❤

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

      @@msantosh1220 Remember, just as it is my duty to make the world a better place by providing free education to you and the rest of the world, it is your duty to click thumbs up and comment on each video that you learn from. So have fun with the videos and see you in the comments.

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

      Yes Mike, I Will make sure that I like and leave at least three comment on each video that I watch. One again thankx for sharing your knowledge with all of the world ❤❤❤.

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

      @@msantosh1220 With support like that from you and other viewers, we are a Team!!!! Go team : )

  • @AbdurRahim-ot5gp
    @AbdurRahim-ot5gp 4 ปีที่แล้ว

    Please make tutorial video for material inventory software and hotel booking software

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

    Hi Mike, in my Excel 2016 version, i need to use CTRL+SHIFT+ENTER to use the array function comparing 365 version you are using.

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

      Yes, that is correct.

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

    nice!

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

    Hi Mike, I think I flunked this one,, I’m not sure what “unique days” means. I thought I would follow it anyway but I was thrown by the double use of Date in the frequency function. If you could help on these issues I would be very grateful. I’m using Excel 2016, but I’m on the Office 365 so Excel seems to be a hybrid of these two. Thanks.

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

      I have a whole chapter in the book I wrote about this. I also posted the link at the end to the FREQUENCY video that explains it. Here is the link again: th-cam.com/video/uUrI8hoj8BA/w-d-xo.html

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

      Thanks for the reply Mike. Which particular book that you wrote are you referring to? (There were a couple of different ones when I googled your name). Thanks.

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

      @@davegoodo3603 Ctrl Shift Enter, Mastering Excel Array Formulas. But all the content in the book is free at TH-cam: th-cam.com/play/PLrRPvpgDmw0kjL4875H36yNhWBb0f-nci.html Videos 17 & 18 cover the FREQUENCy and Unique Count.

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

      Thanks for that Mike, you da man!

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

    Bro suggest me formula for
    Like 2 month 4 days or 5 days(not on date)then auto calculate 2.5 month and if there is 3 month 24 days or 25 days then auto calculate 4 months.
    Thanks

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

    Hi Mike.. also.. note that your file link is: people.highline.edu/mgirvin/TH-camExcelIsFun/EMT16120.xlsx which lands at a Page Not Found error. I edited to /EMT1620.xlsx to get to the file :-)

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

      Thanks for letting me know. I just fixed the link. It is working now.

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

    Hi Mike.. great challenge. Just for fun, I came up with this array formula which produces the same result as the FREQUENCY formula construct:
    {=SUM(IF(Date>=F6,IF(Date

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

      Thoughts, I have a whole chapter just on comparing FREQUENCY and COUNTIFS for Unique Count formulas : ) There is no comparison. COUNTIFS can blow up your computer with slow calculations with only 10,000 rows. FREQUENCY is far superior to COUNTIFS for Unique Count. But, your formula is cool, especially since you invented it and had fun with this topic!!! Thanks for the formula, Wayne!

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

      @@excelisfun Thanks Mike.. that was my intuition, as when copying the formula down I noticed a slight lag in the calculation of results. Thanks for the tip on FREQUENCY/COUNTIFS.. I'll go back and read that chapter in detail. I appreciate your guidance! :-)

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

      @@wayneedmondson1065 Yes, when i wrote the chapter and did the tests, I was sort of stunned that COUNTIFS could be so slow.

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

    In the pivot table how do you group the date into two columns, one for the year and the other for month? thank you

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

      I showed in video : 1) Group, 2) then use Tabular Report Layout.

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

      Design, Report Layout, Layout, Tabular.

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

      Thank you so much. Yes, you have said it but I did not pay attention. Sorry.

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

      @@adecarvalho Glad to help : )

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

    6:36 Pivot Table Function

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

      : )

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

      @@excelisfun :)

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

    Thanks Mike..

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

      You are welcome, Khan Bhai!!!