cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
pjbogacz Frequent Visitor
Frequent Visitor

Remove filter on single table "issue"

Hi, I was playing around with filtering on single table and... ended up with some serious doubts about my mental health :D. Need assistance if filtering removal is behaving correctly (and why, if so)? For testing purpose, I created simple 3x3 table on blank report – two columns to be used by selectors and one basic measure summing the third one. Pasting below 5 different scenarios, after manipulating (clicking/selecting) only single selector:
1. Baseline – measureA drops filtering of SelectorZ and sums all rows – all good
2. Selecting single value within SelectorA clashes the measure – why, if it should drop filter on SelectorZ (similarly to baseline case) and indicate “1”?
5. Selecting two values (one that shares the same row) clashes also – shouldn't be “101” (still unable to drop the filter on SelectorZ)?
3. & 4. Selecting all values, but differently – once by “select all” option (3), another time by clicking 3x on each item (4) returns different result - ...

PBI filtering issue.png

Apart of allexcept(), I've checked also all() and removefilters() on selected column and they all "work" alike. All comments will be helpful, thx.

1 ACCEPTED SOLUTION

Accepted Solutions
Super User
Super User

Re: Remove filter on single table "issue"

Hey @pjbogacz ,

 

you are facing the "dreaded one-table solution" that is implicit with the concept of auto exists.

This concept is described in this article https://www.sqlbi.com/articles/understanding-dax-auto-exist/

 

Consider to create a star schema, meaning create separate tables for each of the columns inside your fact table, except the numeric columns that will be used as measures.

 

Regards,

Tom

Hamburg - Germany
If I answer your question, please mark my post as solution, this will also help others.
I accept Kudos :-), If you find my post helpful.

Proud to be a Datanaut!

View solution in original post

3 REPLIES 3
Super User
Super User

Re: Remove filter on single table "issue"

Hey @pjbogacz ,

 

you are facing the "dreaded one-table solution" that is implicit with the concept of auto exists.

This concept is described in this article https://www.sqlbi.com/articles/understanding-dax-auto-exist/

 

Consider to create a star schema, meaning create separate tables for each of the columns inside your fact table, except the numeric columns that will be used as measures.

 

Regards,

Tom

Hamburg - Germany
If I answer your question, please mark my post as solution, this will also help others.
I accept Kudos :-), If you find my post helpful.

Proud to be a Datanaut!

View solution in original post

Community Support Team
Community Support Team

Re: Remove filter on single table "issue"

Hi @pjbogacz ,

Why do you create your measure like below? 

MeasureA = CALCULATE ( SUM ( 'Table'[Value] ), ALLEXCEPT ( 'Table', 'Table'[SelectionA] ) )

Why not just like this?

MeasureA = SUM ( 'Table'[Value] )

 

 

Best Regards,

Icey

 

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

pjbogacz Frequent Visitor
Frequent Visitor

Re: Remove filter on single table "issue"

Thanks Tom,
normally I use dictionary tables, as you're suggesting. I was wondering though why such feature exist, your explanation & article were really helpfull. Thanks again for not only precise but rapid resonse.

To Icey,
the measure and whole example was created as a sandbox. The idea was to drop one filter (hence allexcept() function) and sum over the rest which is <> what you're suggesting. Nevertheless thanks for contribution.

Helpful resources

Announcements
New Topics Started Badges Coming

New Topics Started Badges Coming

We're releasing new versions of the badge that everyone's talking about. ;) Check your inbox for notifications.

MBAS 2020

Save the new date (and location)!

Our business applications community is growing—so we needed a different venue, resulting in a new date and location. See you there!

Difinity Conference

Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

Top Solution Authors
Top Kudoed Authors (Last 30 Days)