Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hello Community,
I am trying to crease a measure using something similar to the MATCH function from excel.
I have a table(1) that tells me which of the company's training modules my coworkers have completed. Another relationship between tables(2) tells me which modules each coworker must take. I would like to use something like MATCH that would scan table 2 and tells me if there is a match in table 1, if true it would return me as "Completed" and if false "Due".
Below there is an image to help understanding
I tried using CONTAINS, but did not succeed.
Appreciate your help!
Solved! Go to Solution.
Another solution using Query Editor.
1. Left Outer Join
2. Conditional Column.
See the attached screenshots.
Hi @Tcerginer,
Tested it on my local environment using the sample data below.
We can get the the expected result by using the DAX below.
Column = IF(ISBLANK(LOOKUPVALUE(Table1[Coworkers],Table1[Modules ],Table2[ModulesMustTake],Table1[Coworkers],Table2[Coworkers])),"Due","Completed")
Regards,
Charlie Liao
Thank you very much @v-caliao-msft @Greg_Deckler and @BhaveshPatel for helping me! I'm new with PowerBI and I am self teaching Relational Database from scratch, you are really helping me out! Your solutions aren´t working yet, because the problem is a bit more elaborated and I should have been more specific.
As the company I am working have many employees, the modules that must be taken depends on the employee's function and those modules are susceptible of change over time, I created the relational model below:
Obs: 'trail' means all the modules that a function should take. The doctor's trail is different from engineer's trail..
As you can see, I dont have this 'table2' to use the LOOKUPVALUE. But we know that the tables 'coworkers' and 'trail' are related through table 'function'. Is it possible to generate this 'table2' using Dax or queries so we could use lookupvalue?
Another point:
It is possible for a coworker to take modules that aren´t on their trails! A Teacher could take Math if wanted. Those would be displayed in another separated table, as they aren´t obligatory.
I hope could make myself clear. English is not my mother language.
Thanks again for the support!
Tom
@BhaveshPatel solution will work, you just need to do it 2 times
1) merging Coworkers with Trail
2) merging 1) with Graduated
Thank you very much @Stachu @BhaveshPatel@v-caliao-msft!!
Both solutions helped me a lot! It is working now 😄
Another solution using Query Editor.
1. Left Outer Join
2. Conditional Column.
See the attached screenshots.
You can use "LEFT OUTER JOIN" in Merge Queries in Query Editor to get the desired results.
It includes all the rows in the Courses table in the results, whether or not there is a match on the CourseID column in the Coursecompletionstatus table. Where there is no matching CourseID for a Course, the row contains a null value.
Perhaps one of the techniques listed here will help:
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
112 | |
97 | |
84 | |
67 | |
60 |
User | Count |
---|---|
150 | |
120 | |
99 | |
87 | |
68 |