Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
inglexjc
Post Patron
Post Patron

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:

inglexjc_0-1670947560923.png

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 2
amitchandak
Super User
Super User

@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...

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

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.

 

inglexjc_0-1670955292381.png

 

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.