Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

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
TomMartens
Super User
Super User

Hey @Anonymous ,

 

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



Did I answer your question? Mark my post as a solution, this will help others!

Proud to be a Super User!
I accept Kudos 😉
Hamburg, Germany

View solution in original post

3 REPLIES 3
Icey
Community Support
Community Support

Hi @Anonymous ,

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.

TomMartens
Super User
Super User

Hey @Anonymous ,

 

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



Did I answer your question? Mark my post as a solution, this will help others!

Proud to be a Super User!
I accept Kudos 😉
Hamburg, Germany
Anonymous
Not applicable

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors