Forum Discussion

LL_'s avatar
LL_
Regular Visitor
2 years ago
Solved

Show no data in table before search

Hi all,   I've created a report based on direct query.   I have the following requirement: I want to search on an specific id in a table but I don't want the table to load all the data beforehand...
  • Anonymous's avatar
    Anonymous
    2 years ago

    Hi LL_ 

     

    Daniel29195 's solution is a good start. It doesn't work here is probably due to that all IDs are filtered out by the measure filter at the first time. So when you search an id with the search bar, it is searching in the empty result from the first filtering, which lead to blank. 

     

    To deal with it, we need to make some changes. You need to have an additional table that has all Id values. Ensure this table is disconnected from the original table. Let's call this new table "Dim Id". Use id column from this new table into the search bar instead. Then use the following measure as a filter and set its value to 1 in the filter pane. 

    measure1 = if( ISFILTERED('Dim Id'[id]), IF( SELECTEDVALUE(tbl[id]) IN VALUES('Dim Id'[id]) ,  1 , 0), 0) 

    I have attached a sample file. Hope it would be helpful!

     

    Best Regards,
    Jing
    If this post helps, please Accept it as Solution to help other members find it. Appreciate your Kudos!