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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
Anonymous
Not applicable

All() not working properly

Hi, 

I'm not sure if this is a known bug or issue, but I have seen some examples of it in the past on the forums but without much being resolved. 

In short, I have a table for returns. I create a column (in power query or dax) called Owned, which returns a 1 if a separate column contains a string "31", or 0 if it doesnt. Really simple. 

The issue comes when I create a measure sumqty. It sums the qty field in the same table, but wants to do that irrespective of the filter selection on Owned, so I use ALL('table'[Owned]). However, when I apply a filter to said column, I receive a number that makes no sense. This also only breaks if I have a separate filter going onto the same table, but that really shouldn't make a difference based on the measures. 

Anyone experience this before? This seems 100% like a bug but I reached out to Microsoft support and they said they couldn't help as I didn't receive an error. 

This is the ONLY table I have in the model. 

Attached are some pictures. Here you can see no filter selected for Owned QtyHere you can see no filter selected for Owned QtyHere a filter is selected for Owned of 0, which returns the expected resultHere a filter is selected for Owned of 0, which returns the expected resultSelecting Owned = 1 returns an unexpected resultSelecting Owned = 1 returns an unexpected result

 

 

7 REPLIES 7
v-easonf-msft
Community Support
Community Support

Hi, @Anonymous 

It is really weird, everything is fine on my side.

Maybe you can try formula as below:

SumQty =
CALCULATE (
    SUM ( 'Master Returns Table'[quality] ),
    REMOVEFILTERS ( 'Master Returns Table'[Owned] )
)

Best Regards,
Community Support Team _ Eason

 

Anonymous
Not applicable

Yeah, I've tried removefilters() and that doesnt work either. 


AlB
Super User
Super User

You have to share the URL to the file hosted elsewhere: Dropbox, Onedrive... or just upload the file to a site like tinyupload.com (no sign-up required).

 

SU18_powerbi_badge

Please accept the solution when done and consider giving a thumbs up if posts are helpful. 

Contact me privately for support with any larger-scale BI needs, tutoring, etc.

 

Anonymous
Not applicable

Hi,  @Anonymous 

I suspect the problem may be that the date field in your slicer and the owned field in your slicer are in the same table ( you need to keep/remove both filters in formula).

As a workaround, you can add a  calendar table(build one-to-many relationship) for the date slicer creation:

 

scheduled_at Table = CALENDAR(Min('Master Returns Table'[scheduled_at]),MAX('Master Returns Table'[scheduled_at]))

 

11.png

Another solution is to disable the interaction of your Owned slicer with the table visual.

Best Regards,
Community Support Team _ Eason

AlB
Super User
Super User

Hi @Anonymous 

Can you share the pbix?

 

SU18_powerbi_badge

Please accept the solution when done and consider giving a thumbs up if posts are helpful. 

Contact me privately for support with any larger-scale BI needs, tutoring, etc.

 

Anonymous
Not applicable

How should I share it? I cant attach it in this comment. 

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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