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

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now

Reply
RobertKuij
Frequent Visitor

How to: show data in secondary table IF one company is selected in the primary table

Dear Members, 

 

I am encountering a small challenge in my PowerBI dasboard. I am creating a dashboard with the search profiles of companies. There is one specific text field called 'Need' (see bottom right of the dashboard). This is written text with additional info about a company's search criteria. 

 

Now I would like to create a filter to only show the company's need (bottom right in the dashboard IF only one company from the primary table is selected (large table on the left/middle. 

 

Untitled22.png

 

How can I create such as filter?

 

 

1 ACCEPTED SOLUTION
hashtag_pete
Helper V
Helper V

Hello Robert, 

 

for example like this: 

 

HasOneFilter = 
    IF(
        HASONEFILTER(Tabelle1[Company Name]),
        VALUES(Tabelle1[Needs]), "")

 

in Tabelle1[CompanyName] you look if there is a filter on this, in VALUES(Tabelle1[Needs]) you give the column that needs to be returned when the company name is filtered. 
If nothing is selected, return empty. 

Does that help?

best

hashtag_pete

View solution in original post

5 REPLIES 5
hashtag_pete
Helper V
Helper V

Hello Robert, 

 

for example like this: 

 

HasOneFilter = 
    IF(
        HASONEFILTER(Tabelle1[Company Name]),
        VALUES(Tabelle1[Needs]), "")

 

in Tabelle1[CompanyName] you look if there is a filter on this, in VALUES(Tabelle1[Needs]) you give the column that needs to be returned when the company name is filtered. 
If nothing is selected, return empty. 

Does that help?

best

hashtag_pete

Great, this works perfectly fine! Thank you very much for the help!

lbendlin
Super User
Super User

Please provide sample data in usable format (not as a picture) and show the expected outcome.

lbendlin
Super User
Super User

Have you looked into functions like HASONEVALUE() or HASONEFILTER() ?

I have no clue how I should type the measure, to be honest. 

Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

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

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

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