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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Iva_C_Maia
Frequent Visitor

Calendar Table is not slicing my data correctly

Hi,

Still on my early days in power bi. Appreciate your wise help 🙂

I have a fact table with 2 relevant date columns, that contain both date and time information (year, month, week, day hhmmss).

I need this information (date and time) for a calculated column that shows the time difference between events.

I have created 2 calendar tables, 1 for each of the 2 date columns in my fact table and created the corresponding relationships in my model.

However, when tried to slice my data per year (only need to slice by year, month, day), most of the data gets assigned to blank field as below:

 

Iva_C_Maia_0-1659094138413.png

I think the problem is related with having time information on my date columns and not on my calendar tables (where I don't need it), but can't seem to find a way to solve it.

Really appreciate all the help you can give me!

Thanks in advance

Iva

 

 

1 ACCEPTED SOLUTION

Hi,

 

Just to share how I solved the problem with my calendar table not filtering my data per date corretly. It was simple. I copy below the link where I found the solution.

 

https://radacad.com/how-to-use-time-and-date-dimensions-in-a-power-bi-model

 

Thanks

 

View solution in original post

5 REPLIES 5
Iva_C_Maia
Frequent Visitor

Correction:

when I say "that contain both date and time information (year, month, week, day hhmmss)."

I mean day, month, year hhmmss - 16/03/2020 11:07:13

hi @Iva_C_Maia 

the date format does not seem to be the problem. You have two date tables. What are you trying to achieve exactly? Provide a sample of your data and explain the meaning of each date/column along with final expected results. Thank you

I have a large database of tests (1 ID_test per row), each test has a date/time for event1 (date column1 date) and a date/time for event2 (date column2).

I have 2 objetives:

1 - calculate the time difference betwwen event1 and event2 (this I have done, using a calculed column with datediff);

2 - create visuals where I see the distribution of tests per year, month, day, considering the date when event1 and/or event2 took place.

I hope this was clear. Thanks you for your help!

Hi,

 

Just to share how I solved the problem with my calendar table not filtering my data per date corretly. It was simple. I copy below the link where I found the solution.

 

https://radacad.com/how-to-use-time-and-date-dimensions-in-a-power-bi-model

 

Thanks

 

Anonymous
Not applicable

Hi @Iva_C_Maia ,

 

Glad to hear you have solved your problem. Please mark the reply as a solution. More people will benefit from it.

 

Best Regards,

Stephen Tao

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors