cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
bswylie Regular Visitor
Regular Visitor

ALL() function ignored / inconsistent functionality when also using report level filter

While working on an analysis report we came across (what seems to be) an issue in Power BI, and are not sure if this is a bug or a misunderstanding on our part. In summary, a measure we have created which uses the ALL() filter modifier seems to calculate incorrectly when a report level filter is applied, and the correctness of the ALL function seems to vary depending on what is selected in the page filter.

 

We have been able to reproduce the strange behaviour using some very simple test data. The test data set we are using to portray this issue is shown in the image below:

 

00.png

 

When we implement the measure shown in the image below,

 

0.png

 

and have all the selection boxes of the DateID report filter selected,

 

1.png

 

the ALL() function works as expected, and ignores the corresponding slicers that we try to apply to the CountALLInstances measure that we have.  See images below.

 

 

Without start day or sick days filter applied (correct results)

 

2.png

 

Note that the CountFilteredInstances is similar but does not have the ALL function, and always performs as we expect.

With a start day filter applied (correct results)

 

3.png

With a sick day filter applied (correct results)

 

4.png

 

 

However, when we only have SOME of the DateID report filter options selected, the ALL() function is no longer able to turn off the corresponding slicers that we apply to the CountALLInstances.  The value for CountALLInstances that we would expect to see regardless of whether the Start Day or Sick Day slicer is applied is “6”, but this is not the case as can be seen in the images below

 

5.png

 

Without start day or sick days filter applied (correct results)

 

6.png

With a Start Day filter applied – incorrect results despite the ALL function. CountALLInstances should still be “6”.

 

7.png

With a Sick Days filter applied – incorrect results despite the ALL function. CountALLInstances should still be “6”.

 

8.png

We would greatly appreciate if anyone is able to identify whether this is a bug or is expected behaviour, and thus how we would work around this.

 

The desktop file is linked below for reference.

 

https://dl.dropboxusercontent.com/u/78036039/Sick%20Leave%20Report%20Filter%20Test%20v2%20-%20201610...

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
bswylie Regular Visitor
Regular Visitor

Re: ALL() function ignored / inconsistent functionality when also using report level filter

Hi,

 

I got a response from Microsoft to my ticket and wanted to share the result. This did fix the problem as per screenshot below. I'm not sure why there is a difference between PBI and PowerPivot results, but I'm grateful to have something to work with. It is not clear whether the Power BI support team considers this a bug or not as they refer more to "problem" and "workaround". I was under the impression everything could be done from a flat table in PBI if only one source being used, but it's not much admin to add to link up at least. Thanks all for the input.

 

Microsoft support response

Use the ALL function on the dimension attribute instead of the column in the fact table, and use the slicer on the dimension attribute, this seems to workaround the problem.

 

Corrected.png

 

21 REPLIES 21
bswylie Regular Visitor
Regular Visitor

Re: ALL() function ignored / inconsistent functionality when also using report level filter

Hi all,

 

Can anyone tell me if this does seem to be a bug or if we are doing something wrong? Would greatly appreciate if anyone can respond and say whether they also find this strange behaviour?

 

Cheers

scottsen Senior Member
Senior Member

Re: ALL() function ignored / inconsistent functionality when also using report level filter

I took a look... and agree that something weird and broken is happening.  Definately use the "send a frown" feature of PBI Desktop, and attach your pbix file to the mail... the product team will take a look.

bswylie Regular Visitor
Regular Visitor

Re: ALL() function ignored / inconsistent functionality when also using report level filter

Thanks so much, I really appreciate having someone else confirming this. I'll do as you recommend!

bswylie Regular Visitor
Regular Visitor

Re: ALL() function ignored / inconsistent functionality when also using report level filter

Am waiting on Microsoft Power BI team to respond... For interest - I built the same test in PowerPivot and found that it worked perfectly. Screenshot below

 

Which is a little concerning for Power BI. It was pretty obvious to me that something didn't seem right, but what if there are other DAX engine issues which seem more subtle? I'm sure Microsoft will help sort it out quickly though.

 

PowerPivot Working.png

Super User
Super User

Re: ALL() function ignored / inconsistent functionality when also using report level filter

@bswylie

 

Thanks for pointing out this issue and raising with Microsoft!

 

I played around with your example and created a simple example of my own, and the behaviour seems to be the same whether the filters are applied through slicers or Report Level filters.

 

The behaviour seems to be:

  1. For the set of columns that have 'slicers' (or I guess any filter) applied (i.e. the Columns for which ISFILTERED( Column ) = TRUE ), cross-filtering is applied among those columns.
  2. This results in a reduced list of values per filtered column.
  3. When the DAX expression is evaluated, ALL(...) correctly clears the filters on columns specified, but the cross-filtered values for the other columns are retained!!!

 

For example, when you filtered Date ID = 01, 02, 03 and StartDay = Mon, cross-filtering reduced Date ID down to just 01.

Then the DAX expression cleared the filter on StartDay, but Date ID was left filtered to just 01, resulting in a row count of 3.

 

Of course this is all incorrect behaviour. Hopefully fixed soon!

 



Did I answer your question? Mark my post as a solution!

Proud to be a Datanaut!




Super User
Super User

Re: ALL() function ignored / inconsistent functionality when also using report level filter

Yep! Curious to see what they say about this?

 

2016-10-12 - ALL Function with Slicers.png

bswylie Regular Visitor
Regular Visitor

Re: ALL() function ignored / inconsistent functionality when also using report level filter

Thanks Owen and Sean for also looking into this, much appreciated! I did raise a ticket with Microsoft through the ticket system on the website on Monday afternoon SA Time ( Monday morning US time). As a Pro subscriber, they said I'd hear back from them in one business day... I've heard nothing back from them. Anybody know how I can raise the urgency with them on this? As an "engine" issue, this is causing patently incorrect results on my report, and I'm sure may other people's reports too, but perhaps they are just not noticing it because it is less obvious! So I perceive this to be fairly serious and thought I'd have heard back from them by now.

 

For anybody Microsoft on this forum, my ticket number is 116101014778110.

 

As an aside, Icouldn't find any send a frown on the desktop version or online version, and the "smile" button just gives you an option to "get help" which takes you to https://powerbi.microsoft.com/en-us/support/ which is where I logged the ticket...

bswylie Regular Visitor
Regular Visitor

Re: ALL() function ignored / inconsistent functionality when also using report level filter

@OwenAuger - agreed, also found that slicers exhibit same problem. I just used the use case where I had it on the filters pane - so I think fundamentally to do with how the engine is handling "filtering" before applying the DAX formula

bswylie Regular Visitor
Regular Visitor

Re: ALL() function ignored / inconsistent functionality when also using report level filter

@Sean - will let you know! Do you know of any other way I can contact Microsoft about this, as have had no reply to my support ticket?