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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
lennox25
Post Patron
Post Patron

How to highlight differences between two tables -showing data thats on one table and not on another

I have two tables not related. I need to highlight any missing dates between both tables. This example only shows dates missing on the second table but for other stores dates could be missing from the first table. In this example I would like the missing dates from Table 2 highlighted in table 1. So 10/04/23, 16/04/23 and 23/04/23 would be highlighted.

lennox25_0-1702385247834.png

lennox25_1-1702385261545.png

 

 

1 ACCEPTED SOLUTION
Bibiano_Geraldo
Super User
Super User

Try the following code:
1- In the first table put the following code:

Column=
VAR data = 'Your_Current_Table'[Date]
VAR result =
LOOKUPVALUE(
    'Your_Second_Table'[Date],
    'Your_Second_Table'[Date],
    'Your_Current_Table'[Date]
    ) = data
RETURN
result
 
2- Create a measure with the following code:
Measure= SUM('Your_Current_Table'[Column])
 
3- In your matrix, format conditionaly your values as shown bellow. Make sure that your based field is the measure created before

 

Bibiano_Geraldo_1-1702390482130.png

 

View solution in original post

3 REPLIES 3
smpa01
Super User
Super User

@lennox25  you can write a measure like this

Measure= 
VAR _left =
    { MAX ( t1[Date] ) }
VAR _RIGHT =
    GENERATE ( _left, VAR ky = [Value] RETURN FILTER ( t2, t2[Date] = ky ) )
RETURN
    IF (
        COUNTROWS ( _RIGHT ) == BLANK (),
        "missing in 2nd table",
        "not missing in 2nd table"
    )
Did I answer your question? Mark my post as a solution!
Proud to be a Super User!
My custom visualization projects
Plotting Live Sound: Viz1
Beautiful News:Viz1, Viz2, Viz3
Visual Capitalist: Working Hrs
Bibiano_Geraldo
Super User
Super User

Try the following code:
1- In the first table put the following code:

Column=
VAR data = 'Your_Current_Table'[Date]
VAR result =
LOOKUPVALUE(
    'Your_Second_Table'[Date],
    'Your_Second_Table'[Date],
    'Your_Current_Table'[Date]
    ) = data
RETURN
result
 
2- Create a measure with the following code:
Measure= SUM('Your_Current_Table'[Column])
 
3- In your matrix, format conditionaly your values as shown bellow. Make sure that your based field is the measure created before

 

Bibiano_Geraldo_1-1702390482130.png

 

Thank you - your brilliant!

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.