Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

Use outside filter context within a calculate table

Hi All,

 

I created a calculated table starting from the main table, but if I apply a filter on the main table it doesn't filter the calculate table. 

 

Here below the schema:

 

 

 

 

 

 

 

Here below the code:

 
CALCULATED TABLE =
 
VAR Main_Table_Var = FILTER(
   MAIN_TABLE;
   [Filter1]
)

VAR Calculated_Table_Var=SUMMARIZE(
   Main_Table_Var ;
   [Column1];
   "Test"; SUM([Column2]);
)
 
Return
   Calculated_Table_Var
 
I don't understand why the main_table_var gets ever the whole main table without considering the filter I've applied to it in the report.
 
Thanks!!
 
 
  • Anonymous's avatar
    Anonymous
    6 years ago

    means you want first your main table get filtered and based on filtered table your calculated table needs to be calculATED?

     

    if your requirement is like this then it is not possible because calculated table gets loaded at first load only and they will not get calculated every time based on some filters.

     

    Thanks & regards,
    Pravin Wattamwar
    www.linkedin.com/in/pravin-p-wattamwar

    If I resolve your problem Mark it as a solution and give kudos.

4 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Make sure your main table is connected with Calculated table .

    You can do it in relationship tab.

     

     

    Thanks & regards,
    Pravin Wattamwar
    www.linkedin.com/in/pravin-p-wattamwar

    If I resolve your problem Mark it as a solution and give kudos.

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hi Anonymous 

       

      Many thanks for your reply, I'm looking for an alternative solution.

       

      Because I would use the filtered main table as starting point for the calculated table. 

       

      Regards

      • Anonymous's avatar
        Anonymous
        Not applicable

        means you want first your main table get filtered and based on filtered table your calculated table needs to be calculATED?

         

        if your requirement is like this then it is not possible because calculated table gets loaded at first load only and they will not get calculated every time based on some filters.

         

        Thanks & regards,
        Pravin Wattamwar
        www.linkedin.com/in/pravin-p-wattamwar

        If I resolve your problem Mark it as a solution and give kudos.