Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
bhavinpatel_23
Frequent Visitor

Need help with DAX

I have email addresses in column10 of the query name report. I also have email addresses in column3 of the query name sheet1. I need to find uncommon email addresses between column10 and column3.

How do I write this?

Thank you guys as always.

1 ACCEPTED SOLUTION
v-yuezhe-msft
Employee
Employee

@bhavinpatel_23,

Create the following calculated column in Report table.

DiffOfsheet1 = CALCULATE(COUNTROWS(sheet1),FILTER(sheet1,sheet1[Column3]=EARLIER(Report[Column10])))>0

Create the following calculated column in sheet1 table.
DiffOfreport = CALCULATE( COUNTROWS(Report), FILTER(Report, Report[Column10]= EARLIER( sheet1[Column3]) ) )> 0

Then create a new table using Dax below, and filter diff column to “False”.

Table = UNION(SELECTCOLUMNS(Report,"col",Report[Column10],"diff",Report[DiffOfsheet1]),SELECTCOLUMNS(sheet1,"col",sheet1[Column3],"diff",sheet1[DiffOfreport]))
1.JPG

If the above steps don’t help, please share sample data of your tables and post expected result here.


Regards,
Lydia

Community Support Team _ Lydia Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
v-yuezhe-msft
Employee
Employee

@bhavinpatel_23,

Create the following calculated column in Report table.

DiffOfsheet1 = CALCULATE(COUNTROWS(sheet1),FILTER(sheet1,sheet1[Column3]=EARLIER(Report[Column10])))>0

Create the following calculated column in sheet1 table.
DiffOfreport = CALCULATE( COUNTROWS(Report), FILTER(Report, Report[Column10]= EARLIER( sheet1[Column3]) ) )> 0

Then create a new table using Dax below, and filter diff column to “False”.

Table = UNION(SELECTCOLUMNS(Report,"col",Report[Column10],"diff",Report[DiffOfsheet1]),SELECTCOLUMNS(sheet1,"col",sheet1[Column3],"diff",sheet1[DiffOfreport]))
1.JPG

If the above steps don’t help, please share sample data of your tables and post expected result here.


Regards,
Lydia

Community Support Team _ Lydia Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Thank you so much Lydia.

You are awesome. How do I learn more about DAX? where can I find different functions and meaning for those functions?

thanks again.

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.