Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
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