0

I want to filter a matrix of data in Power BI by total for one category but leave the row context unfiltered to allow drill down.

I am using a switch measure but it evaluates down to the row level too and I'm not sure how to adjust it. Can someone provide a suggestion?

This image shows filter of >100000 but the filter is applied to rows too

  1. Swtich = SWITCH(SELECTEDVALUE('Sales Control Table'[ID]), 1,[Over25000],2,[Over50000],3,[Over100000],[Total Sales])
  2. Over100000 = CALCULATE(SUM(Sales[Net Sales]),filter(Sales,SUM(Sales[Net Sales]) > 100000))
1
  • Also I tried using visual filters but that doesnt help me Commented Mar 10, 2022 at 20:49

2 Answers 2

0

Created a filter, thanks guys I learned a lot

sumofitem = CALCULATE('_Sales Measures'[Swtich], ALLEXCEPT(Sales,Sales[Item]))

SelectedFilter = IF(ISBLANK('_Sales Measures'[Swtich]) || ISBLANK('_Sales Measures'[sumofitem]),1,0)

Sign up to request clarification or add additional context in comments.

1 Comment

As it’s currently written, your answer is unclear. Please edit to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers in the help center.
0

I was able to modify my code to show blank for the top hierarchy, now I just need to filter it out

Over100000 = if ( ISINSCOPE(Sales[Cust Category]), (CALCULATE(SUMX(sales,Sales[Net Sales]), filter(Sales, (Sales[Sold To Name] in DISTINCT(Sales[Sold To Name]))))) ,  ( CALCULATE(SUM(Sales[Net Sales]),FILTER(Sales, SUM(Sales[Net Sales]) > 100000))))

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.