Forum Discussion

pji's avatar
pji
Advocate I
8 years ago
Solved

Create dynamic tables based on filters

Hi, I would like to know if I can create a dynamic table in Power BI based on a report filter? 

 

I am trying to write this query:

 

SummaryTable = CALCULATETABLE(SUMMARIZE('Sheet1','Sheet1'[team_ID]), FILTER('Sheet1', SELECTEDVALUE(Sheet1[team_ID])))

 

But it doesn't work. The SELECTEDVALUE() works fine for measures, but not at all for table creation or a role creation for RLS.

 

Please help.

  • Hi pji,

     

    Not like measures, calculate columns/tables are computed during database processing(e.g. data refresh) and then stored in the model, they do not response to user selections(or other filters) on the report.

     

    So it is not possible to create a calculate column/table that can change dynamically with user selections(or other filters) on the report.

     

    Regards

2 Replies

  • v-ljerr-msft's avatar
    v-ljerr-msft
    Microsoft Employee

    Hi pji,

     

    Not like measures, calculate columns/tables are computed during database processing(e.g. data refresh) and then stored in the model, they do not response to user selections(or other filters) on the report.

     

    So it is not possible to create a calculate column/table that can change dynamically with user selections(or other filters) on the report.

     

    Regards

  • Do you know if there is any possibility to create a matrix table with dinamic number of coordenates? I have tried to created a calculated table with GENERATEALL and GENERATESERIES, but as calculated table can be use with HASONFILTER it is not working? I'm a little lost on how to do it? 

    Thanks