Forum Discussion

deepguptaac's avatar
deepguptaac
Frequent Visitor
3 years ago
Solved

Custom filter buttons

Hi folks, I am currently building a sales report which has one Sales Summary containing data as below: And one item category classification sheet as below: And one cost sheet as below:...
  • v-yadongf-msft's avatar
    3 years ago

    Hi deepguptaac 

     

    If you want to custom filter buttons, I think field parameter is suitable for you. Here's my sample.

     

    My test table:

     

    Create some measures of criteria you want to filter:

    Without Item category A = CALCULATE(SUM('Table'[Sales]),FILTER('Table','Table'[Item category] <> "Item category A"))
    
    Item category A & B = CALCULATE(SUM('Table'[Sales]),FILTER('Table','Table'[Item category] = "Item category A" || 'Table'[Item category] = "Item category B"))
    
    Item category C = CALCULATE(SUM('Table'[Sales]),FILTER('Table','Table'[Item category] = "Item category C"))

     

    Enable field parameters:

     

    Create field parameters:

     

    You will get a parameter table like this:

     

    Then you can use the field paramter to create slicer to filter your report:

    Best regards,

    Yadong Fang

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.