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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
electrobrit
Post Patron
Post Patron

Show blank until something but the values to show when selected is in another table

I have one table with Project Notes (ProjectTable2[Notes]) and one table with Project Names (ProjectTable1[ProjectName])
(they are related through ProjectID in both tables)
I have a table of the projects and a seperate table visual with the notes but would like to show notes empty (or text) until a project is selected then show the notes.

I can't get this to work being they are seperate tables. It does not give me an option to select another table, only another measure.

Show notes = If(IsFiltered(ProjectTable1 ([ProjectName]), ProjectTable2[Notes])
Tried this too, won't let me select the notes column from another table:
Show text = if(Isfiltered(ProjectTable1 ([ProjectName]), ProjectTable2[Notes], "Select a project to view notes")


Can someone help me with what I am doing wrong with this?
I know I could merge but seeing if I can do without a merge first.
Can you do measures to say until something in this table is fitlered, show blank, then when it's filtered, a field from another table show show (again, they are related)?
thank you in advance!
1 ACCEPTED SOLUTION
jdbuchanan71
Super User
Super User

Hello @electrobrit 

Give this a try.  I will show "Select a project" if none or more that one project is selected.  If a single project name or id from the ProjectTable1 is selected it will show the note.

Note = 
VAR _Project = SELECTEDVALUE ( ProjectTable1[ProjectID] )
RETURN 
IF ( 
    ISBLANK ( _Project ), 
    "Select a project",
    CALCULATE ( 
        MAX ( ProjectTable2[Notes] ),
        ProjectTable2[ProjectID] = _Project
    )
)

None selectedNone selectedProject SelectedProject Selected

I have attached my sample file if you need it.

View solution in original post

2 REPLIES 2
jdbuchanan71
Super User
Super User

Hello @electrobrit 

Give this a try.  I will show "Select a project" if none or more that one project is selected.  If a single project name or id from the ProjectTable1 is selected it will show the note.

Note = 
VAR _Project = SELECTEDVALUE ( ProjectTable1[ProjectID] )
RETURN 
IF ( 
    ISBLANK ( _Project ), 
    "Select a project",
    CALCULATE ( 
        MAX ( ProjectTable2[Notes] ),
        ProjectTable2[ProjectID] = _Project
    )
)

None selectedNone selectedProject SelectedProject Selected

I have attached my sample file if you need it.

@jdbuchanan71 worked perfectly, many thanks!

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.