Relationship Issues With DateTime Data Types in Power BI

แชร์
ฝัง

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

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

    THANK YOU so much for this. I had been pounding my head against my desk for the last 2-hours trying to figure out what the problem was. Bravo!

    • @pbannajelly
      @pbannajelly วันที่ผ่านมา

      me right now... oh my goodness, that totally worked. 😭😆

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

    Thanks! This has been driving me nuts for years. I kinda understood what was going on, but your explanation put it in front of me where I could really see it.

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

      Thank you! I wished PBID made it more clear about this issue, which is why I made this video.

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

      @@HavensConsulting
      I sat through this pain for about a day and tried to figure out what I did wrong and implemented so many solutions and it still didn't work until 15 mins ago when I accidentally found a comment in some power bi community website.
      Some guy said "Open it with Power Query" so I tried it and I was like dying.
      I mean how could someone figure this out?
      In fact, Microsoft should put this issue in the first page of power bi training material saying that "DO NOT CHANGE DATE TIME DATA TYPE ON POWER BI BECAUSE IT'S USELESS AS HELL AND USE POWER QUERY INSTEAD, FOR THE LOVE OF GOD!!!"
      I think this is the worst bug i ever found in power bi.
      Have you ever encountered a worse bug than this one? 😂

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

      @@norpriest521 Yeah sadly I agree. I've given candid feedback to the Power BI team that this needs to be updated. Since it's the ONLY type conversion you do that DOESN'T actually change the type. :\

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

    You are a hero! I bashed my head against this for an hour this morning before figuring out what question I needed to ask, which was answered right here! Thank you!

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

    Experienced that myself! I could not believe what was happening so i created a calculated column in dax with the year month and day of the column and worked! Now I understand why 😀

  • @PDOT1990
    @PDOT1990 6 หลายเดือนก่อน

    You are a God send!!! The way I have been stuck on this for 4 hours going back and fourth. Thank you so much.

  • @joshstone313
    @joshstone313 10 หลายเดือนก่อน

    OH MY GOSH - Thank you so much for this! Many, many hours later. As a Power BI beginner, this was so not obvious.

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

    What a great video that just saved me from hours of pulling my hair out. I completed the changes you suggest in the video and a model I created just all fell into line. Can't thank you enough.

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

    I wish I would have discovered this a week ago! I have been trying to join a Date field to a Date/Time field and had no idea why nothing was work. Thanks!!!!😀

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

    Great video! I've found there are many nuances to making the most of time intelligence. Personally, I'm not fond of joining on a date - for this very reason. I've found that adding a column in Power Query with this simple formula (=Number.From()) converts my date column into an integer value. I use this column in my Date Table as primary key to join to other tables that have dates. The tables I join have a date foreign key column that uses the same formula. Now I'm joining on integer values, which is my personal preference. Keep up the great work!

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

      Great idea, Chris. I’ll give that a try.

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

    OMG !!
    For the last 3 hours, I am searching for this information. Man you saved me
    I can’t thank you enough. !!!!
    love from India

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

    I lovvvvvveeeeeeeee you, i've been literally looking for this a whole week in powerbi forums and i got nothing.
    You got a new subscriber

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

      I'm glad I could help! It's been a major pain for so many people! 😅

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

    Your are a lifesaver! Was driving me mad and this was the exact issue i was having and this solution worked a treat. Thank You! :)

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

    Thank you so much. I've been battling with this issue for the past 3 days and could not figure out what I was doing wrong. Cheers!

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

    Thank you! Really helped me with my work! More blessing to you!!!

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

    Brilliantly explained! Thank you for your elaboration and for being on the point! A+++

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

    Fantastic video! Have wracked my brain all week on this issue! Much appreciated!

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

    brilliant!!! you explained really well, I finally understood the problem! Thanks!!!

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

    Thanks - was thinking I was an idiot trying to get it to work until I saw this video - thanks alot

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

    Thank you for the video! I was getting frustrated with the cross filtering not functioning properly :D

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

    No joke... I love you man! THANK YOU. This video just helped me keep my sanity with this project (for now)

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

    Not sure as to why, but using the locale option rather than just changing to date, which would result in errors, helped me achieve this.

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

      Wow! I was also getting errors, and I was only able to make it work thanks to you comment :)

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

    super helpful and well explained! The ref article is a treasure!
    Note, if any of the datetime columns contains a timestamp (e.g.yyyy,mm,dd,hh,nn,ss) then the other table should have hh,nn,ss in order to create a relationship.

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

    I went crazy with one report until figured it out! Thanks Reid!

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

    Oh Wow! You break this down into a great explanation and example! Thank you so much for this information!

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

    Excelent content. However, I need the other way around and show Date/Time. How can I make Power BI Desktop understand the same Date/Time format?

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

      Good question. If you have a fact table with both Date and Time dimensions it's recommended to have seperate dimension tables for each. Otherwise you'd need one row for every second between your start and stop date. That's 36 million rows per year! Here's a good article talking about splitting your date and time tables. radacad.com/how-to-use-time-and-date-dimensions-in-a-power-bi-model

  • @mr.somebody6368
    @mr.somebody6368 3 ปีที่แล้ว

    This saved me so much time, I wish I saw this earlier. Thanks a lot!!!

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

    You are an absolute lifesaver!!!!

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

    Great video, saved me a lot of time - thank you

  • @richardpierce919
    @richardpierce919 8 หลายเดือนก่อน

    Hi, if I have power query from t-sql that brings through datetime with zero seconds should I convert to date?

    • @HavensConsulting
      @HavensConsulting  8 หลายเดือนก่อน

      Definitely, I'd recommend converting any DateTimes to Date in Power Query before importing, if you don't need time, else best practice is having a separate Date and time Dim Table

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

    This is fantastic ! You made my day. Cheers

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

    Thank you for saving me more hours of frustration.

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

    Many thanks for sharing this information! It helps!

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

    Your help is appreciated, on my calendar date I see extra date compared to my fact table. Why is it not showing the same range? Thank you

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

      Are you getting the min and max dates from your fact table or using the CALENDARAUTO function? If you make your calendar table using:
      CALENDAR( MIN(Fact[Date]), MAX(Fact[Date]) )
      Then your date range in the calendar table will match your fact table.

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

      @@HavensConsulting I get the Max Date. Its working OMG. Thank you so much sir.

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

      @@BigO_Notation glad to hear it! I'd check out my other calendar videos too! Plenty of good tips on making quality calendar tables

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

      th-cam.com/video/AdLDYohLeJc/w-d-xo.html

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

      @@havenscr definitely, I have been looking at your contents and will check out the rest. Thank you

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

    Thanks so much!! This was just what I was looking for.

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

      You're very welcome! I'm glad you found it helpful.

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

    I just wanted to say a huge thank you I was struggling with this a found it very difficult to find an answer.

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

      So happy it helped! Honestly my favorite video I recorded just because of how it helps people

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

    yes it's very help full video. made my day. Thank you so much

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

    Wow, this is great. Thanks Reid!

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

    thanks so much ! the last trick solved my issue! You are awesome!

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

    I realize that this is a bit older video, and that this information may already be known, but thought I would share anyway. In my case, the data sets I am working with are somewhat large and I am, for reasons I won't go into here, having to pull it over VPN as well, so modifying my Power Query was not something I wanted to do unless I had to. It occurred to me that there might be another option, which led me to an alternative work-around for this issue. If you create a new column with DAX (e.g. Created = [MyDateTimeColumn].[Date]) and format it as Date with the ShortDate format, you can use the date table without breaking the date field, or having to add tons of items to your date table to match granularity.

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

      Great alternative! Yes if you can't apply a date extract in PQ, then a DAX column works just fine :)

  • @oscarelworthy
    @oscarelworthy 5 หลายเดือนก่อน

    When we generate dates in power BI dax, such as "date(2024,8,30)", it says these will return the date in datetime format. Do you know which of the three datetime formats these are loaded in?

    • @HavensConsulting
      @HavensConsulting  5 หลายเดือนก่อน

      Are you referring to the actual datetime format? Not the data type? If so I think it defaults to the locale of your machine, since places like US, Europe, Asia, etc. all have different standard formats

    • @oscarelworthy
      @oscarelworthy 5 หลายเดือนก่อน

      @@HavensConsulting In powerquery, dates can be either date, datetime, or datetimetimezone. Then once the values are in the model, you can only change their visible format.
      So my question is, which datatype from powerquery would match with dates generated entirely within the model (such as a calendar or date() dax function).
      I'm having issues comparing dates from powerquery with dates generated within the model as above.
      Sorry for any confusion about format/datatype.
      thanks for the quick reply!

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

      @@oscarelworthy the model itself only has datetime, the rest is "formatting", so I'd recommend converting in PQ to date only first, for your fact dates to then correctly key to DIM - Date on your calendar table :)

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

    Straight to the point, you saved my report ;) thanks!

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

    Is it possible to keep the imported column as datetime, and then have a calculated column that uses only the date part, and then join on the calculated column?

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

      Absolutely! You could add that column either through Power Query, or through DAX. Personally I recommend PQ because it compresses the data a bit better during the refresh/import process.

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

      @@HavensConsulting So if I want to keep the time part of the datetime data, but still want to join to a calendar date field - would you say the best option is to create an extra date-only calculated field in PQ and use that to join back to the calendar table? My only concern is that I have quite a few dates in my data, so would end up with a lot of duplicated date only columns. Thanks for the reply as well!

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

      @@JoeAverage2006 that’s correct. The only way to join to a date only calendar table is you’d need a date key that is also date only

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

      @@havenscr Thank you! I'll start creating those date only columns to join on. It is interesting, there are many calendar tutorials out there but almost no one mentions this.

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

      @@JoeAverage2006 sure thing! My video on issues with date time from earlier this year talks about this as well 🙂

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

    amazing you just saved my sanity!

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

    Thank you for this great explanation!

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

    Thank you SO much. This saved me!

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

    Thank you so much! Finally solved my issue!

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

    Thank you - saved me so much time!

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

    You saved me. Thank you !!

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

    Really THANK YOU so much, this helped me a lot

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

    This solved my problem, thank you!

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

    Awesome!! 👏👏👏👏👏👏

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

    Very grateful for this, thank you!

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

    That was very helpful. Thanks.

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

    saved me a lot of thought! thanks!

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

    This is great, thank you!

  • @williamleveson-gower5088
    @williamleveson-gower5088 2 ปีที่แล้ว

    Thank you, thank you, thank you !!!!.

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

    Very helpful 🤠👍👍👍

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

    Thanks bro! This video saved me!

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

    Good one 👍. Thank you.

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

    You saved my soul

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

    Thanks a lot ... 🙏

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

    Great tip

  • @hassanbolaji1886
    @hassanbolaji1886 2 หลายเดือนก่อน

    Thanks so much.

  • @earngsnsn
    @earngsnsn 2 หลายเดือนก่อน

    Thank you so much

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

    Thank you it's work

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

    Now this make sense

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

    Thank you

  • @sabrinatorres4108
    @sabrinatorres4108 6 หลายเดือนก่อน

    Hope this works for 😢

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

    Life Saver