Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
chris2
Regular Visitor

Failing to us a time table as dimension

Hi,

 

I am trying to follow this https://radacad.com/how-to-use-time-and-date-dimensions-in-a-power-bi-model

 

I created a dim_time and a dim_date table and corrospondig realtionships to my fact table as described in the blog. 

The relationship with the dim_date table works as expected. 

 

However the relationship with the dim_time table does not work correctly. Somhow no all times are matched to each other.

 

chris2_0-1659962137695.png

 

I checked:

  • Datatype of both times
  • direction of relationship (1:n) : dim_time -> fact_time
  • relationship is active

 

Anyone any idea how to fix this problem?

 

Many thanks in adavance!

2 REPLIES 2
RicoZhou2
Resolver I
Resolver I

Hi @chris2 ,

 

If there is a dimtime matching facttime, data in dimtime won't show blank.

My Sample:

RicoZhou2_0-1660199201072.png

DimDate:

DimDate = CALENDARAUTO() 

DimTime:

let
    Source = List.Times(#time(0,0,0),24*60*60,#duration(0,0,0,1)),
    #"Converted to Table" = Table.FromList(Source, Splitter.SplitByNothing(), null, null, ExtraValues.Error),
    #"Renamed Columns" = Table.RenameColumns(#"Converted to Table",{{"Column1", "Time"}}),
    #"Changed Type" = Table.TransformColumnTypes(#"Renamed Columns",{{"Time", type time}})
in
    #"Changed Type"

Relationship:

RicoZhou2_1-1660199252318.png

Result is as below.

RicoZhou2_2-1660199267613.png

 

Best Regards.

 

Hi @RicoZhou2 ,

 

thank you for your reponse. You basically described what I did. The only difference is that I get blank times on both the fact and the dim side.

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.