The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.
Hello!
I a query, I want to filter rows using the MAX date from a column in a table of another query.
Any idea how to do that? I was thinking something like MAX(Table1.Column1) but I am not sure how it is exactly.
Thanks!
Solved! Go to Solution.
Hi @Anonymous ,
It's easy using DAX or Relationship. If you want to do this in Query Editor, you could refer to the following steps.
1# Sort the Date of Table2 from latest to earliest.
2# Add a custom column in Table1.
3# Add a conditional column and filter the null value.
Best Regards,
Jay
Hi @Anonymous ,
It's easy using DAX or Relationship. If you want to do this in Query Editor, you could refer to the following steps.
1# Sort the Date of Table2 from latest to earliest.
2# Add a custom column in Table1.
3# Add a conditional column and filter the null value.
Best Regards,
Jay
Hi @Anonymous
I believe what you are looking for is LASTDATE? Measure = LASTDATE ( 'table'[column]).
Hope this helps.
Also, if you don't already, I'd recommend adding a Calendar / Date table (https://www.sqlbi.com/articles/creating-a-simple-date-table-in-dax/) which helps keep things nice and in order 🙂 You can then create relationships between the relevant Fact tables to the Date table and maintain filtering / slicing using the Dates from the Date table to ensure consistency and alignment.
Have a good one!
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
User | Count |
---|---|
60 | |
55 | |
53 | |
49 | |
30 |
User | Count |
---|---|
179 | |
87 | |
70 | |
48 | |
45 |