Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
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
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
76 | |
76 | |
55 | |
36 | |
34 |
User | Count |
---|---|
99 | |
56 | |
53 | |
44 | |
40 |