Forum Discussion
bvy
Helper V
3 years agoConstant 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. ...
- 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.
bvy
Helper V
3 years agoHi Greg_Deckler and thanks for taking time to look at this with me...
I see where you're heading with this, but your proposed change doesn't work. I've tried some variations also, and they don't work either. See below...
Greg_Deckler
Community Champion
3 years agobvy Likely incorrect configuration of the visual or a difference in relationships. City should come from the City table and Name from the Person table. Take a look at the PBIX attached below signature, working great there.
- bvy3 years ago
Helper V
You were right. I had changed the relationsship to two way and forgot to send it back. Appreciate the help.