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
uif19085
Helper III
Helper III

Calculated column if date is the same with others from other table

Hello i need to calculated column to flag rows that are having the same date as ones from other tables, like this:
Also, i have no relationship between these two tables:

IDDateCheck Column
105/02/2020          1
106/02/2020          0
205/02/2020          1
207/02/2020          0
305/02/2020          0
405/02/2020          0
506/02/2020          0
605/02/2020          1

 

IDDates
105/02/2020
107/02/2020
205/02/2020
306/02/2020
507/02/2020
605/02/2020
1 ACCEPTED SOLUTION

@uif19085 

pls set the ID column to TEXT or try below DAX

Column = 
var _check=maxx(FILTER(Table2,'Table 1'[ID]=Table2[ID]&&'Table 1'[Date]='Table2'[Dates]),Table2[ID])
return if(isblank(_check),0,1)

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




View solution in original post

3 REPLIES 3
uif19085
Helper III
Helper III

Hello, @ryan_mayu and thank you for your answer. It seems i got an error: "DAX comparison operations do not support comparing values of type Integer with values of type Text". I've check whay type of data are both of the column, Whole number and Date. Do you have any idea what should i do?

@uif19085 

pls set the ID column to TEXT or try below DAX

Column = 
var _check=maxx(FILTER(Table2,'Table 1'[ID]=Table2[ID]&&'Table 1'[Date]='Table2'[Dates]),Table2[ID])
return if(isblank(_check),0,1)

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




ryan_mayu
Super User
Super User

@uif19085 

pls try this

Column = 
var _check=maxx(FILTER(Table2,'Table 1'[ID]=Table2[ID]&&'Table 1'[Date]='Table2'[Dates]),Table2[ID])
return if(_check="",0,1)

1.PNG

pls see the attachment below





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




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.