Forum Discussion

Atlan's avatar
Atlan
Frequent Visitor
2 years ago
Solved

Problem with two Date columns

Hi,

I use a query that produce a column with different time values (03.01.2022 09:48:44). In Power Bi I use the Preselected Slicer with a Date Table. In the Datetable all times 00:00:00. So I think not all rows match so my values are wrong. In Power BI i changed the format to only date without time for both columns. But only rows with 00:00:00 time show in the visuals. What can I do?

 

Thanks.

Regards

Marcel

  • Hello Atlan 

     

    as i can not see all the settings and data completely, i have tried to prepare sample file using same fields like you (only necessary one) 

    DateFilters.pbix

    please download this and verify all the settings. 

    let me know if it helps. 

     

    Thanks,

    Sayali

10 Replies

  • Hi Atlan ,

     

    You can solve this problem using the following step.

    1. Create new calculated column date using formule - 

    newdate = 'tablename'[olddate].[Date]

    change the data type of new column as date not date/time

    2.  for preselected slicer - date table - also do the same . the column which is used for relation should be in data type 'Date' 

     

    Only changing format would not help 

     

    Thanks and Regards,

    Sayali

    Please mark the question solved when done and consider giving a thumbs up if posts are helpful!! 

     

     

    • Atlan's avatar
      Atlan
      Frequent Visitor

      Hi,

      sayaliredij 

      thanks for the fast replay.

      Im an absolute new bee. I tried your solution but I cant implement in the right way.

      Here som Pics for a better oversight about my configuration:

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

      Thanks for your efforts.

      Regards

      Atlan

    • Atlan's avatar
      Atlan
      Frequent Visitor

      Hi

      I cant give you pbix file couse there are sensitiv Data what could not be published.

      Can i give you other Informations?

      Regards

      Atlan

  • HI Atlan 

     

    sure i undestand !!

     

    Can you provide me following screenshot?

    Table Abfrage is data view .. where i can see how column creation date look like 

    Table Date 

    Thanks,

    Sayali

    • Atlan's avatar
      Atlan
      Frequent Visitor

      Hi yes.

      I hope this is what you need.

      I changed the format form Date/ time to Date.

      Regards.

      Atlan

  • Looks all good 

    Just connect creation date to the date from date table and check if its working

    Thanks,

    sayali 

     

    • Atlan's avatar
      Atlan
      Frequent Visitor

      Hi sayaliredij 

      i connectet both tables like the enclosed pic. I enclosed also two pics. The Tableview is empty but there are two values that must show in Jan. 24. But nothing. Only the values that orginaly had the date value with time 00:00:00 will show in the tablevisual.

       

      Thanks for your efforts.

      Regards

      Atlan

  • Hello Atlan 

     

    as i can not see all the settings and data completely, i have tried to prepare sample file using same fields like you (only necessary one) 

    DateFilters.pbix

    please download this and verify all the settings. 

    let me know if it helps. 

     

    Thanks,

    Sayali

    • Atlan's avatar
      Atlan
      Frequent Visitor

      Hi sayaliredij ,

      many thanks for your help with my problem. I tried the slicer with your Data. With this Data works the Preselect Slicer. So I watched again over my configuartion. The Date column had still the Time so the most values couldnt match and I got wrong values. I tried it with this:

      newdate = FORMAT(Abfrage1[CreationDate]; "DD.MM.YYYY")
      After I connect both date columns it works as expected.
      Best Regards
      Atlan