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
MrGorkajuice
Frequent Visitor

Is this a bug?

Hi,

 

I'm seeing some weird behavior that I suspect is a bug. The most basic reproduction I can come up with is this:

 

Setup:
One table:

FilterColumnMeasureColumn
10
10
20
21

 

One measure that is intended to calculate all rows in the above table, respecting any filters applied to FilterColumn, but ignoring filters applied to MeasureColumn if present:

 

IgnoreMeasureColumnFilter = CALCULATE(COUNTROWS('Table');ALL('Table'[MeasureColumn]))
 
One slicer that filters on FilterColumn.
One Card visual that shows IgnoreMeasureColumnFilter. This visual contains has a basic filter: "MeasureColumn is 1".
 
The bug:
When the slicer is set to include all FilterColumn values, the visual shows 4. This is as expected, as the measure is ignoring the visual filter of MeasureColumn = 1. When the slicer is set to include only FilterColumn 2, the visual shows 2. This, again, is to be expected, because the FilterColum filter is respected, leaving two records to be counted. However, when the slicer is set to include only FilterColumn 1, the visual says (Blank). This, to me, suggests that the ALL-method is being ignored completely, which is weird given that it worked just fine when no filtering took place on FilterColumn.
 
Am I missing something?
3 REPLIES 3
Greg_Deckler
Super User
Super User

@MrGorkajuice - I'm not sure that this would be classified as a bug per se. Maybe. Have run into similar things and the "problem" is actually the Filter pane. I suspect that it is the Filter pane that is causing the issue as I have seen similar things with Report level and Page level filters. I'm thinking perhaps it is going like slicer filters -> visual level filter -> DAX

 

So when you apply the visual level filter to the set coming back from the slicer you get nothing going to DAX so an ALL filter of nothing is still blank.

 

I have attached a sample PBIX for others to experiment with. 

 

You might want to submit this as an issue and see what comes back.


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

Thanks for the response. There definitely seems to be something to your explanation, as I can get around the issue by moving the MeasureColumn filter from the visual to a slicer. On the other hand, it also seems a bit more complicated, as the MeasureColumn 0 rows makes it to the DAX expression as long as the slicer filter doesn't completely reduce the dataset to 0 records...

 

Thanks for confirming that it is indeed weird. I will submit it as an issue 🙂

Yeah @MrGorkajuice I think it is some kind of optimization going on with the Filter pane. It's similar if you have a Page level filter, those things will never be included in DAX calculations because they essentially get pre-filtered out before getting to DAX. The Filter pane can definitely cause weird behavior. But, I agree that it's odd because it only happens in this case when the set gets filtered to zero.


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

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.