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
Krijgerss21
Helper II
Helper II

Dax formule

hello i need some help to make a table visual

 

i want to make a table that if i select a name in a another table that it filters to table to the items of the name if i dont select anything in the table i want that the other table is emty 

 

if i would use a slicer i would use this dax measure 

Lege kaart visuals =
//Geeft een lege kaart of tabel als geen waarde is geselecteerd
If(HASONEVALUE(dataset),SELECTEDVALUE(dataset,"_"))

 

now this measure doesnt work with filtering from a table :S

 

if placed a screenshot of my dashbpoard

Krijgerss21_0-1686899783165.png

so if i select a person in the left table the right table must filter if i dont select a person i want that the richt table is empty

2 REPLIES 2
v-stephen-msft
Community Support
Community Support

Hi @Krijgerss21 ,

 

You can use the following DAX measure to filter the table based on the selected name in the other table:

Filtered Table = 
IF(
    ISFILTERED('Table'[Name]),
    CALCULATE([EXPRESSION], FILTER('Table', 'Table'[Name] = SELECTEDVALUE('Table'[Name]))),
    BLANK()
)

This measure checks if the 'Name' column in the 'Table' is filtered. If it is, then it filters the 'Table' to show only the rows where the 'Name' column matches the selected value. If it is not filtered, then it returns a blank table.

                                                                                                                                                         

Best Regards,

Stephen Tao

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.           

GuillaumePower
Frequent Visitor

I've 2 questions, do you have two tables with a relationship between ? Do you have already a correct filtering whitout the "no selection" issue ?

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.