Forum Discussion

capko's avatar
capko
Helper II
3 years ago

Summarize applying filters

Hello,

 

I'm trying to filter a calculated table using a slicer.

 

Let's say that I have an existing table (TABLE 1) with a list of sales of each article, the date of the sale and the total amount:

 

ArticleDateAmount
Apple01/01/202310
Watermelon02/01/202320
Apple04/02/202350
Grapes05/03/202315
Apple25/02/20236
Watermelon07/02/202324

 

I have a slicer controlling the period of time in order to calculate the SUM of 'Amount'. In this case the slicer is set between the 01/02/2023 and the 31/12/2023. The result of the SUM will be then 95.

 

I will then create a second table (TABLE 2) that will summarize the articles using the following code:

 

 

 

 

 

 

 

SUMMARIZE(TABLE1,TABLE1[ARTICLE],"Amount",SUM(TABLE1[Amount]))

 

 

 

 

 

 

 

ArticleAmount
Apple66
Watermelon44
Grapes15

 

As it can be seen the 'Amount' of the TABLE2 is not the good one because the filter is not applying to the SUMMARIZE. Can I obtain the good amounts taking into account the filter ?

2 Replies

  • bcdobbs's avatar
    bcdobbs
    Community Champion

    Calculated tables are always populated when the data is loaded so don't respond to report filters.

     

    You need to use a measure to sum the amounts and then drop it and the article name into a table visual which will do the summarising for you live respecting filters.

    • capko's avatar
      capko
      Helper II

      So even if I create a relation between TABLE1 & TABLE2 the TABLE2 will never be updated when I'll modify the slicer ?