Forum Discussion
conditional relationship on date criteria
Hi, I need to create a complex relationship between two tables, AGGR and OFF based on dates. Basically the relationship between AGGR[COD_PROM] and OFF[codprom] should only occur if AGGR[date]>= OFF[startdate] and AGGR[date]<=OFF[enddate].
How can I stabilize this relationship? What code should I write? Thank you!
3 Replies
- parry2k
Super User
Anonymous can you share the sample data with the expected output? Read this post to get your answer quickly.
https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490- AnonymousNot applicable
i want that relationship between on columns, as keys, cod_prom and codprom works ONLY if a date in AGGR is on range of startdate and end date of table OFF.
Thank you
- parry2k
Super User
Anonymous still not sure what is the logic of the expected output. I see all the dates that are in aggr table