Microsoft is giving away 50,000 FREE Microsoft Certification exam vouchers. Get Fabric certified for FREE! Learn more
So I have 2 tables. The data table has a resolvedDate (datetime). The other table, which I guess would be a dimension table, has an index column, start date and end date both in datetime. Id like to add a column on the data table that references the index to the dimension table using the resolvedDate that falls between the given start and end dates. I understand this may be simpler with ust dates and not datetimes but in this instance I need to group using the datetimes. Whats the best approach here?
Solved! Go to Solution.
Hi @riegersn
Can you try the following:
Column =
CALCULATE (
VALUES ( Table2[Index] ) ,
FILTER ( Table2 , Table2[Start Date] <= EARLIER ( Table1[Resolved] ) && Table2[End Date] >= EARLIER ( Table1[Resolved] ) ) )
Please make sure to adjust the names of your tables accordingly.
Hope this helps.
Theo
If I have posted a response that resolves your question, please accept it as a solution to formally close the post.
Also, if you are as passionate about Power BI, DAX and data as I am, please feel free to reach out if you have any questions, queries, or if you simply want to connect and talk to another data geek!
Want to connect?www.linkedin.com/in/theoconias
Hi @riegersn ,
Don't seem to quite understand your requirements, there doesn't seem to be a related field between the two tables. Make sure this is the correct data model?
Can you provide relevant test data and screenshots of the desired results. Easy for me to answer for you as soon as possible. Looking forward to your feedback.
Best Regards,
Henry
Hi @riegersn
Can you try the following:
Column =
CALCULATE (
VALUES ( Table2[Index] ) ,
FILTER ( Table2 , Table2[Start Date] <= EARLIER ( Table1[Resolved] ) && Table2[End Date] >= EARLIER ( Table1[Resolved] ) ) )
Please make sure to adjust the names of your tables accordingly.
Hope this helps.
Theo
If I have posted a response that resolves your question, please accept it as a solution to formally close the post.
Also, if you are as passionate about Power BI, DAX and data as I am, please feel free to reach out if you have any questions, queries, or if you simply want to connect and talk to another data geek!
Want to connect?www.linkedin.com/in/theoconias
Hi @riegersn
Can you try the following:
Column =
CALCULATE (
VALUES ( Table2[Index] ) ,
FILTER ( Table2 , Table2[Start Date] <= EARLIER ( Table1[Resolved] ) && Table2[End Date] >= EARLIER ( Table1[Resolved] ) ) )
Please make sure to adjust the names of your tables accordingly.
Hope this helps.
Theo
If I have posted a response that resolves your question, please accept it as a solution to formally close the post.
Also, if you are as passionate about Power BI, DAX and data as I am, please feel free to reach out if you have any questions, queries, or if you simply want to connect and talk to another data geek!
Want to connect?www.linkedin.com/in/theoconias
Check out the April 2025 Power BI update to learn about new features.
Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.
User | Count |
---|---|
93 | |
60 | |
44 | |
35 | |
34 |