Forum Discussion

inglexjc's avatar
inglexjc
Post Patron
3 years ago

Have data take primary

What Logic do I need to use to  show the “Intake CW – Primary” if it exists.  If it doesn’t, then show the “Intake CW”. 

 

I need the data to show on one line:

I currently created a table:

Intake Caseworker = DISTINCT( UNION(ALL('Table'[Name - Primary Intake Caseworker]), ALL('Table'[Name - Intake Caseworker])))
But I have a case where there is a Primary Intake Caseworker and they are showing blank on my Report but the Data shows it there.  And if there is a Primary Intake Caseworker we only want them listed and then if there isn't one then list the Intake Caseworker.

2 Replies

  • inglexjc , not very clear, we create a common table and join with both tables, on join will be inactive use use relationship to activate 

     

    Intake Caseworker = DISTINCT( UNION(DISTINCT('Table'[Name - Primary Intake Caseworker]), DISTINCT('Table'[Name - Intake Caseworker])))

     

    and if count('Table'[Name - Primary Intake Caseworker]) is not blank then it has primary in take

     

    example

     

    countx(filter( values('Intake Caseworker'[Name - Primary Intake Caseworker]), not(isblank(calculate(count('Table'[Name - Primary Intake Caseworker]) ))) ), [Name - Primary Intake Caseworker])

     

     

    https://radacad.com/userelationship-or-role-playing-dimension-dealing-with-inactive-relationships-in-power-bi

    • inglexjc's avatar
      inglexjc
      Post Patron

      Are you creating a new column in the table "Intake Caseworker"?  Or creating a new table?  Because when I create a new column in my table it's counting the Case workers, which is not what I'm wanting.