Forum Discussion

Desarrollador9J's avatar
Desarrollador9J
Frequent Visitor
4 years ago
Solved

Measure summary table not updating with filtered context

Hi everyone.

 

I create a measure summary Table getting measures from several tables, like this:

 

 

 

SummaryMeasures =

var measures=
UNION(
ROW("MEASSURE","measure 1", "VALUE",[Measure_1]),
ROW("MEASSURE","measure 2", "VALUE",[Measure_2])
)

Return
measures

 

 

 

And the result is like this:

 

MEASSURE || VALUE

-------------------------

measure 1  || 0.56

measure 2  || 8.54

 

The problem is that when I change the active filters (eg country, dates) the value of the measures in this new table is not updated. When I use the measures individually, they do update when I modify the filters.

 


I understand that it could be because I have to relate this new table to the rest of the tables in the model, although I have no idea how  because there are no columns here that I can use as FK . Does anyone know how I could solve this problem? I am new to DAX and am looking for information at the same time as doing this question.

 

Thanks a lot

  • Anonymous's avatar
    Anonymous
    4 years ago

    Hi Desarrollador9J, the query you have created will create new Table in the Data Model when the Data Model is refreshed.  You can't pass slicer selections as this happens after the Data Model is loaded.  You will need to specific the filter context within the DAX code above.

     

    I am wondering why you need to create a Summary table.  Could you consider using a Visual?  A Matrix table can be used to show a list of Measure results.  This visual will be impacted by Filtered Context.

     

    The trick is you use the following feature to switch the measures from Columns to Rows:

     

     

     

4 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Desarrollador9J, the query you have created will create new Table in the Data Model when the Data Model is refreshed.  You can't pass slicer selections as this happens after the Data Model is loaded.  You will need to specific the filter context within the DAX code above.

     

    I am wondering why you need to create a Summary table.  Could you consider using a Visual?  A Matrix table can be used to show a list of Measure results.  This visual will be impacted by Filtered Context.

     

    The trick is you use the following feature to switch the measures from Columns to Rows:

     

     

     

    • melanid's avatar
      melanid
      Frequent Visitor

      Hi Anonymous ,

       

      How would you proceed if the need is to create an other table ? How to put the filter inside the formula please ? 

       

      Thanks a lot, 


      Best regards

  • Thank you a lot Anonymous ! 

    That was exactly what I needed, but I dind't know that the Matrix visualization had the word wrap feature.

     

    Thanks again for your help.

     

     

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi melanid - I am not sure what you mean.  Could you please consider create a new post with more details about your problem so others can help?


    Many thanks

    Daryl