Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

Create A Measure Affected only by Specific Slicers

Hi all,

I have a table here, with Item Number, Customer Sales and ROM (rest of market) sales:


I also have two slicers - one for the Customer Name and another for the Market.  I'd like the slicer for the Customer Name to ONLY affect the 'Cust - L12 Sales $' measure and the Market slicer to only affect the 'ROM - L12 Sales $' measure.  How do I accomplish this?  

  • Anonymous's avatar
    Anonymous
    6 years ago

    Hi Anonymous ,

     

    If i understand you correctly, ALLEXCEPT() function might be helpful for you.

    Please refer to below measure and see if the result achieve your expectation.

    total_sales = CALCULATE(SUM('Table'[Sales]),FILTER(ALLEXCEPT('Table','Table'[Customer Name]),'Table'[date]>201910))
    total_ROM = CALCULATE(SUM('Table'[ROM]),FILTER(ALLEXCEPT('Table','Table'[Market]),'Table'[date]>201910))

    Here's my sample data and result would be shown as below.

     

    Best Regards,

    Jay

    Community Support Team _ Jay Wang

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

4 Replies

  • Anonymous so you have two tables that contains customer and rest of market or these are slicer values?

  • mwegener's avatar
    mwegener
    Most Valuable Professional

    Hi Anonymous ,

     

    look at this.

     

    https://dax.guide/allexcept/

     

    If I answered your question, please mark my post as solution, this will also help others.

    Please give Kudos for support.

  • mwegener's avatar
    mwegener
    Most Valuable Professional

    Hi Anonymous ,

     

    has your question been answered?

     

    If I answered your question, please mark my post as solution, this will also help others.

    Please give Kudos for support.

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Anonymous ,

     

    If i understand you correctly, ALLEXCEPT() function might be helpful for you.

    Please refer to below measure and see if the result achieve your expectation.

    total_sales = CALCULATE(SUM('Table'[Sales]),FILTER(ALLEXCEPT('Table','Table'[Customer Name]),'Table'[date]>201910))
    total_ROM = CALCULATE(SUM('Table'[ROM]),FILTER(ALLEXCEPT('Table','Table'[Market]),'Table'[date]>201910))

    Here's my sample data and result would be shown as below.

     

    Best Regards,

    Jay

    Community Support Team _ Jay Wang

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