Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi Community,
I'm new to DAX and struggling to do a 'vlookup' to find matching values in tables that are not related.
I'm working with 2 databases:
Unfortunately the Successor database is quite messy, with records where Employee ID (Holder) = Employee ID (Successor), which is redundant data. I have added a column "Is Real?" with Yes/No to differentiate the real successor records.
Master database
Successor database
Required solution:
To find out if an employee is also a successor, I want to add a "Is Successor" column in the Master database.
It needs to match the value of Employee ID + Month in the Master Database, to Employee ID (Successor) + Month (only looking at records where Is Real Successor = Yes) in Successor database.
Where it finds a match, to return "Yes", else "No":
Is Successor column (solution)
I've tried using Lookupvalue, but it didn't work because the relationship is between Master Database [Employee ID] and Successor Database [Employee ID (Holder)].
Using Query/Merge would be a more elegant solution, unfortunately it slows down the PBI desktop file considerably due to the huge Master database size.
Attached is the PBI file for reference.
Many thanks in advance for your insights and guidance!
Best regards,
Kim
Solved! Go to Solution.
look at this article, it has examples for a measure that would use TREATAS/INTERSECT
https://www.sqlbi.com/articles/propagate-filters-using-treatas-in-dax/
EDIT actually added the link to the article
Proud to be a Datanaut!
look at this article, it has examples for a measure that would use TREATAS/INTERSECT
https://www.sqlbi.com/articles/propagate-filters-using-treatas-in-dax/
EDIT actually added the link to the article
Proud to be a Datanaut!
User | Count |
---|---|
25 | |
11 | |
8 | |
6 | |
6 |
User | Count |
---|---|
26 | |
12 | |
11 | |
8 | |
7 |