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.
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 - ...
Apart of allexcept(), I've checked also all() and removefilters() on selected column and they all "work" alike. All comments will be helpful, thx.
Solved! Go to Solution.
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
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.
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
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.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
118 | |
107 | |
70 | |
70 | |
43 |
User | Count |
---|---|
148 | |
104 | |
104 | |
89 | |
66 |