Forum Discussion
gerard-kouadio
3 years agoHelper I
create new column from 2 tables using if function
Hello, I have 2 tables and I want to create a column from the ids of the 2 tables. I want to do something like this: if id of table 1 = id of table 2, put yes, if no, put No. NB: there is a many-to...
- 3 years ago
HI gerard-kouadio ,
Pls refer the below sample:
tableA:
Table B:
Column = var Q1 = TableA[ID] var NewCol = CALCULATE(MAX('Tableb'[ID]),Tableb[ID]=Q1) return IF(NewCol<>BLANK(),1,BLANK())Best Regards
Lucien
- 3 years agoI finally used this code:New colomn = if(ISBLANK(LOOKUPVALUE('Table1'[Id], 'Table1'[Id],Table2[Id])),"Non","Oui")
Mikelytics
3 years agoResident Rockstar
Hi gerard-kouadio,
Can you please show a picture of the data model as well as explain how you want to visualize it? Which visual do you want to use and which columns do you also want to put into the visual?
Best regards
Michael