Forum Discussion
Relationship issue between date fields
I hope someone can help
I have created a relationship between a date table and a database. The link is between "date" (from date table) and "date closed" (fromthe database)
The aim is to have a card which counts the amount of lines in the database based on how many have been closed in a selectable date range. However when I make this the card returns "(blank)".
Both columns are in date format, if I use the date closed as a filter and turn off the relationship it works, I have 4 other tables which all have relationships to date closed without any issues
Any help with why this relationship might not be working would be greatly appreciated
Thanks
Matt
Hi
Thanks for your support
The reason it was only matching 11 entries was due to the Database table "Date Closed" being retrieved in Date/Time format. Once I edited this it all worked.
Thank you for your time helping on this
Matt
11 Replies
- CoreyPSolution Sage
Can you share picture of your relationship schema please and thanks
- Matt22365Resolver III
Hi
Thanks for getting back to me I have attached a pictue of my relationships to one of the other comments
The only issue I am having is the highlighted blue line. I want the "Date" Table to filter the "Database" table then a card to count the amount of lines where the date closed matches the filter. e.g. in 2019, how many lines of the database have been closed
Thanks
Matt
- amitchandakSuper User
Refer my blog, how to handle two dates using same time dimension
HR-Analytics-Active-Employee-Hire-and-Termination-trend
Appreciate your Kudos. In case, this is the solution you are looking for, mark it as the Solution. In case it does not help, please provide additional information and mark me with @
Thanks. My Recent Blog -
Winner-Topper-on-Map-How-to-Color-States-on-a-Map-with-Winners , HR-Analytics-Active-Employee-Hire-and-Termination-trend
Power-BI-Working-with-Non-Standard-Time-Periods And Comparing-Data-Across-Date-Ranges
Connect on Linkedin- Matt22365Resolver III
Morning
Thanks for getting back to me, I have used your article for a different issue but I think this requires a more simple fix
I have attached a pictue of my relationships (its a little complex as I link between a lot of tables). The only issue I am having is the highlighted blue line. I want the "Date" Table to filter the "Database" table then a card to count the amount of lines where the date closed matches the filter. e.g. in 2019, how many lines of the database have been closed
Thanks
Matt
Edit - to add a bit more information, if I make a table with both date fields in some dates to match up but not all, see picture below
- v-kelly-msftCommunity Support
Hi Matt22365 ,
Just now I used my sample data to test on your provided relationship schema,but I cant find what your problem is,as everything runs fine in here:
So now pls advise me what the measure you are using?And in the table "Database",which column are you filtering with?
For my .pbix file, pls click here.
Best Regards,
Kelly
- v-kelly-msftCommunity Support
Hi Matt22365 ,
If it returns "blank",it means that there's an error in your relationship. So,do you wanna keep the relaitionship?If yes,you can make the relationship inactive(shown as below),otherwise,you can directly delete the relationship.
If above cant solve your problem, can you share the picture of your relationship schema if there isnt any confidential
information inside?
Best Regards,
Kelly
- Matt22365Resolver III
Hi
Thanks for getting back to me
I have attached a pictue of my relationships (its a little complex as I link between a lot of tables). The only issue I am having is the highlighted blue line. I want the "Date" Table to filter the "Database" table then a card to count the amount of lines where the date closed matches the filter. e.g. in 2019, how many lines of the database have been closed
Thanks
Matt
Edit - to add a bit more information, if I make a table with both date fields in some dates to match up but not all, see picture below
- AnonymousNot applicable
Hi,
In the Edit Query Use the Merge Option and select left join Option between"Date" table and "Data Base" table. So it will filter the data from "Database" table based on "Date" table .