Forum Discussion
Anonymous
7 years agoNot applicable
DAX Date Function (Datediff) cross table
Hi there, I have two tables as sources in my report. Now I want to use datediff function on two dates one located in on the other in the other table. Somehow it doesnt seem to support this. ...
parry2k
Super User
7 years agoAnonymous is it one to many relationship? if yes, you can use RELATED function to get date from one side of table relationship.
- Anonymous7 years agoNot applicable
parry2k Hi there, yes it is a one to many relationship. How will then the syntax look like in my example?
- parry2k7 years ago
Super User
Anonymous try following, assuming table2 is on one side of the relationship.
Days Subscribe/Book = DATEDIFF(Table1[dateCreated];related(Table2[Opt-in time]);day)
- Anonymous7 years agoNot applicable
Hi parry2k
Days Subscribe/Book = DATEDIFF(Subscriber[CONFIRM_TIME];related(Buchungen[dateCreated]);day)This is the formula that I ended up with however PowerBi comes up with an error saying that column Buchungen(dateCreated) is not found or not related to a table in this context.What can be the reason? pls. find the relation setting below (sorry it's german)Thx Florian