Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago

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

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

  • 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 ?

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Anonymous ,

     

    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.