Forum Discussion
Need to convert M query as Dax fuction code
- Anonymous4 years ago
Hi Anonymous ,
Please try this.
Result_OPS = SWITCH( TRUE(), CONTAINS('Table','Table'[PP],'Table'[Ops],'Table'[Image Name],'Table'[Image Name]),"Match", 'Table'[Ops]=BLANK(),BLANK(), "Not Match" )Result_PP = SWITCH( TRUE(), CONTAINS('Table','Table'[Ops],'Table'[PP],'Table'[Image Name],'Table'[Image Name]),"Match", 'Table'[PP]=BLANK(),BLANK(), "Not Match" )Attach the PBIX file for reference. Hope it helps.
Best Regards,
Community Support Team_GaoIf there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
Hi ,
Thanks for your response for my post actually I need my output as shown in the below screen shot
actually here if you see , column PP contains 6 row of data and OPS contains 3 row of data .Our result should be of this row wise data
For Example
If PP columns matches with OPS columns then result should be "Match" else "Not Match"
and should have 6 result as a output, because it contain only 6 row of data
If OPS columns matches with PP columns then result should be "Match" else "Not Match"
and should have only 3 result as a output , because it contain only 3 row of data
Remaining should be of "Blank" value
Hi Anonymous ,
Please try this.
Result_OPS =
SWITCH(
TRUE(),
CONTAINS('Table','Table'[PP],'Table'[Ops],'Table'[Image Name],'Table'[Image Name]),"Match",
'Table'[Ops]=BLANK(),BLANK(),
"Not Match"
)Result_PP =
SWITCH(
TRUE(),
CONTAINS('Table','Table'[Ops],'Table'[PP],'Table'[Image Name],'Table'[Image Name]),"Match",
'Table'[PP]=BLANK(),BLANK(),
"Not Match"
)
Attach the PBIX file for reference. Hope it helps.
Best Regards,
Community Support Team_Gao
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!