Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

Adding a simple constant valued measure stops breaks relationships in drill down table visual - why?

    Hi All, I have a simple data model and an accompanying Power BI driven by XLSX file.      Model Every User in the users table has 1 or more sales records in the Sales table   List o...
  • Watsky's avatar
    Watsky
    4 years ago

    Hey Anonymous ,

    Thanks for showing and clarifying. Try this.

    Modify your measure so that it is looking at the userid before returning 123. 

     

    MyConstantValue = 
    VAR userid = SELECTEDVALUE(users[userid])
    RETURN
    IF(userid<>"",123,0)

     

    Then filter MyConstantValue to greater than 0.

    With John selected:

     

    With Jane selected:

     

    The issue is that there isn't a relationship between your measure and the tables so Power BI isn't sure how to handle it. Because of the lack of a relationship that is also why you were seeing blank values. When there is ambiguity Power BI will give all dimensions all possible values. 

    So with the measure and filter change you remove all the ambiguous values leaving only the values you are needing.

    Hope this helps!