Forum Discussion

161521144121144's avatar
161521144121144
Regular Visitor
9 months ago
Solved

Custom column to identify changes between two datasets

Hi, I'm new to PowerBI and need some help with creating a formula in custom column. I have two datasets - one from 2024 and one from 2025 which contain identical column headings. I want the formula t...
  • v-sshirivolu's avatar
    v-sshirivolu
    9 months ago

    Hi 161521144121144 ,

    The Token Eof expected error usually happens when there’s a small syntax issue in your DAX formula like missing line breaks, extra spaces, or parentheses that don’t match. In your case, it looks like the problem might have come from how the line breaks or indentation got copied over.

    Below is a cleaned up version of your formula that should work if you paste it directly into a Power BI calculated column:

    Status =

    VAR MatchRow =
       LOOKUPVALUE(
           Data_2025[Weight source],
           Data_2025[Product code], Data_2024[Product code],
           Data_2025[Product description], Data_2024[Product description],
           Data_2025[Attribute], Data_2024[Attribute]
       )
    RETURN
    IF(
       ISBLANK(MatchRow),
       "not found",
       IF(MatchRow = Data_2024[Weight source], "unchanged", "changed")
    )