Forum Discussion
Anonymous
6 years agoNot applicable
Creating a column using two separate columns from different query.
Hello, I have been trying to figure out how I can create a column that are based off of he date from 2 seperate columns that come from 2 seperate querys. Example Query/table 1 ...
- Anonymous6 years ago
why don't you merge two tables based on id's.
Then create calculated column for status.
Thanks & regards,
Pravin Wattamwar
www.linkedin.com/in/pravin-p-wattamwar
If I resolve your problem Mark it as a solution and give kudos. - Anonymous6 years ago
az38 Anonymous
So Feeling really stupid but I was able to just merge the columns and make it work. Sorry it only my 3week uring power bi now and Thank you both for all teh help.
az38
Community Champion
6 years agoHi Anonymous
try a LOOKUPVALUE() function, like
Status =
var _initialStatus = LOOKUPVALUE('Table1'[initial test], [ID #], [ID #])
var _finalStatus = LOOKUPVALUE('Table2'[final test], [ID #], [ID #])
RETURN
SWITCH(true(),
NOT(ISBLANK(_finalStatus)), "Ready",
NOT(ISBLANK(_initialStatus )) && ISBLANK(_finalStatus), "In-process",
BLANK()
)