Forum Discussion
Need help with Dax
- 4 years ago
SarathB2 , Try like
Flag =
VAR SO = Table2[Object]
VAR _Tab = maxx(FILTER(Table1, CONTAINSSTRING(LEFT(SO,LEN(Table1[Type])),Table1[Type])), Table[Type])
RETURN
_tab
SarathB2 , Try like
Flag =
VAR SO = Table2[Object]
VAR _Tab = maxx(FILTER(Table1, CONTAINSSTRING(LEFT(SO,LEN(Table1[Type])),Table1[Type])), Table[Type])
RETURN
_tab
- SarathB24 years agoFrequent Visitor
Hello amitchandak ,
Thanks a lot, it's working perfectly. Greaful for Quick response.
Regards,
Sarath. - SarathB24 years agoFrequent Visitor
Hello amitchandak , Fowmy
In my case , one of Type is "ANG"
when i try to search that one "ANGULAR" also consedering in Object as pass as it is staring with ANG.
how to avoid this .....
I tried to give a space after ANG like "ANG " but when its come to Desktop its not taking the space .Please assist,
Thanks in advance.
- Fowmy4 years ago
Super User
SarathB2
I modified my code, now you do not need the Flag column.Item = VAR SO = Table2[Object] VAR Tab = VALUES('Table1'[Type] ) VAR Obj = IF( SEARCH(" ", Table2[Object],1,BLANK()) = BLANK(), Table2[Object], TRIM(LEFT( Table2[Object] , SEARCH(" ", Table2[Object],1,BLANK()) )) ) VAR Result = MAXX( FILTER(ALL('Table1'[TYPE]), Table1[Type] = OBJ) , Table1[Type] ) RETURN Result