Forum Discussion
RadhakrishnaE
4 years agoFrequent Visitor
Need Dax for below logic
Hi All, I have a requireement like If table1.columnA = table2.columnB then i want to print Table1.columnc Thanks in advance
Fsciencetech
Helper III
4 years agoPlease send sample data to understand your requirement.
RadhakrishnaE
4 years agoFrequent Visitor
Table 1
| InId | Pid | Commission Person | Commission amount |
| In1 | P1 | Agency | 10 |
| In2 | P1 | broker | 20 |
| In3 | P2 | Executive | 30 |
| In4 | P2 | Agency | 40 |
| In5 | P3 | Broker | 50 |
Table2
| PolTid | Polid | Commission Person |
| PolT1 | P1 | Agency |
| PolT2 | P1 | Broker |
| PolT3 | P1 | Executive |
| PolT4 | P2 | Agency |
| PolT5 | P3 | Agency |
| PolT6 | P3 | Broker |
| PolT7 | P3 | Executive |
Condition is if Table1.commission person = table2.commission person then i want to print Table1.Commission amount
for that i am trying lookupvalue(table1.Commission amount,table1.commission person,table2.commission person)
but getting failed, i want to apply condition on commission person only
Thanks in Advance.
- ERD4 years ago
Community Champion
Hi RadhakrishnaE ,
you can use the measure below:
YourMeasure = VAR c_polid = SELECTEDVALUE ( 't1-2'[Polid] ) VAR c_commperson = SELECTEDVALUE ( 't1-2'[Commission Person] ) RETURN CALCULATE ( MAX ( 't1-1'[Commission amount] ), 't1-1'[Commission Person] = c_commperson, 't1-1'[Pid] = c_polid )If this post helps, then please consider Accept it as the solution ✔️to help the other members find it more quickly.