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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
everyrichrole
Frequent Visitor

Date Relationship Problem

I have a problem with something that seems like it should be very simple. I have a Dates table initially generated by AUTOCALENDAR() and also a Consumables table with ID and Dates Used columns. When I try to relate the Date Used in the Consumables table to the Date field in the Dates table, I am unable to get a count by date in the report view. See pictures.

 

 

relationships.pngtable.png

1 ACCEPTED SOLUTION

Unfortunately, I can't release the PBIX without also giving out a bit too much information about our data sources. I can tell you that I tried creating a new calculated column in the Consumables table with =DATEVALUE(Date Used), and I was able to get the relationship working by using that column. So I suspect this may be an internal bug with the date type/format casting of the Date Used column.

View solution in original post

8 REPLIES 8
RMDNA
Solution Sage
Solution Sage

Hi @everyrichrole,

 

It would be helpful to have a picture of your data, but my first steps would be to set both of your date fields to the Date or DateTime type, and make sure they're in the same format (e.g. both DD/MM/YYYY, etc.).

Thanks for your reply, @RMDNA. Those are the first things I tried. Here's a couple pics of the data.

 

dates.png

 

consumables.png

 

 

 

Hmm, your dates don't look out of alignment. Could you share your PBIX via dropbox/onedrive/etc.?

Unfortunately, I can't release the PBIX without also giving out a bit too much information about our data sources. I can tell you that I tried creating a new calculated column in the Consumables table with =DATEVALUE(Date Used), and I was able to get the relationship working by using that column. So I suspect this may be an internal bug with the date type/format casting of the Date Used column.

Thank you! That solved my Problem too! 🙂

Thanks a lot, this solution worked for me as well, Before using this solution i wasted almost 5/7 hours but not able to reach the desired results with RELATED function output, finally got this solution and it worked 🙂

I had the same problem, DATEVALUE solution works nicely, what worked for me also was changing data type during import from date/time to date only.

 

Maybe someone will find this useful.

 

Best regards

Glad to hear it's fixed! Go ahead and mark your own comment as the solution.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.