Forum Discussion

spoony's avatar
spoony
Helper I
9 years ago
Solved

SummarizeColumns with Multiple Filters

Is it possible to add multiple filters to SUMMARIZECOLUMNS()?   I tried the below and its not giving me the correct number of rows:   Table = SUMMARIZECOLUMNS('Product'[Emonth], 'Product'[Bills],...
  • OwenAuger's avatar
    9 years ago

    spoony

     

    You can do something like this:

    Table =
    CALCULATETABLE (
        SUMMARIZECOLUMNS ( 'Product'[Emonth], 'Product'[Bills], 'Product' ),
        'Product'[Emonth] = "May",
        'Product'[Bills] = "Groceries"
    )

    I added 'Product' as a filter argument to SUMMARIZECOLUMNS, then wrapped in CALCULATETABLE containing the column filters.

    (Since the table is calculated in an unfiltered context, I turned your FILTER functions into single column filters.)

     

    Does this give the intended result?

     

    Cheers,

    Owen