Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hello All,
I am facing an issue in creating a custom table using DAX as mentioned below.
I have two tables with below format
I need a new table in the below format using DAX
Please help.
Thanks,
Sam
Solved! Go to Solution.
Hi @sam021083
I used the SEARCH function to help match.
Table =
SELECTCOLUMNS(
DISTINCT(
GENERATE(
FILTER(ALL('Table1'[Flag]),LEN('Table1'[Flag])>0) ,
FILTER(
'Table2',
SEARCH('Table2'[Exception],'Table1'[Flag],1,0)>0 && LEN(TRIM('Table2'[Exception]))>0)
)
)
,"Flag" , [Flag] , "Exception" , [Exception]) Hi @sam021083
I used the SEARCH function to help match.
Table =
SELECTCOLUMNS(
DISTINCT(
GENERATE(
FILTER(ALL('Table1'[Flag]),LEN('Table1'[Flag])>0) ,
FILTER(
'Table2',
SEARCH('Table2'[Exception],'Table1'[Flag],1,0)>0 && LEN(TRIM('Table2'[Exception]))>0)
)
)
,"Flag" , [Flag] , "Exception" , [Exception]) The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 40 | |
| 37 | |
| 35 | |
| 34 | |
| 28 |
| User | Count |
|---|---|
| 136 | |
| 99 | |
| 73 | |
| 66 | |
| 65 |