Forum Discussion

bvy's avatar
bvy
Helper V
3 years ago
Solved

Constant Measure breaking my One-to-Many Relationship - Why?

Very simple data model and report here to demonstrate my issue. I have a Person table and a City table with a one-to-many relationship on CityID as shown below. I entered the data manually.    ...
  • Greg_Deckler's avatar
    3 years ago

    bvy Maybe:

     

    MyMeasure = 
        VAR __CityID = MAX('Person'[CityID])
        VAR __CityID2 = MAX('City'[CityID])
    RETURN
        IF(__CityID = __CityID2, "Active",BLANK())

    As for why, it is because you coded your measure as a constant. So every row will return that constant value for your measure and thus your current results.