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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
dpombal
Post Patron
Post Patron

DAX REMOVEFILTERS and ALL not working on date column

Hi all i am using may update  and a formula used to work in report similars is not working now.

My problem is very easy to explain I want to fix a calculation to get the average of distance FOR ALL DATES ( so I need to remove filter on this DATEF field, but if I add to the page a slicer, the measure changes, this was working in an old Report, I think It can be something of the new powerbi may 2023 update)

 

My problem is REMOVEFILTERS  is not working fo TableGPS[DATEF] column and also not working for TableGPS[DRILL]

 

version1

DISTANCE TOTAL AVERAGE MD = CALCULATE(
AVERAGE('TableGPS'[DISTANCE]),
      TableGPS[Type]="MD",
      TableGPS'[DURATION]>=70,
   REMOVEFILTERS(TableGPS[DATEF], TableGPS[DRILL])
)

 

 

 

 

version 2 with ALL also not working

DISTANCE TOTAL AVERAGE MD = CALCULATE(
     AVERAGE('TableGPS'[DISTANCE]),
    TableGPS[Type]="MD",
     TableGPS'[DURATION]>=70,
   ALL(TableGPS[DATEF], 'TableGPS'[DRILL])

)

 

Regards


 

14 REPLIES 14
dpombal
Post Patron
Post Patron

Please I need help this looks like a critical error on DAX  related 2 important functions

dpombal
Post Patron
Post Patron

I already know...for this date there are no rows for this criteria, but in prior versions REMOVEFILTERS worked OK and I could FIX the value I want , Please undertstand my requirement, I have other reports working with a similar formula

dpombal
Post Patron
Post Patron

Hi all here I share a link with the PBIX file to download, all trials are wrong.

REMOVEFILTERS and ALL are failing, looks like a bug.

 

Download sample file

https://1drv.ms/u/s!Am7buNMZi-gwg8hT4eo1bkHP975Egg?e=goyfU7 

Regards

some_bih
Super User
Super User

@Mahesh0016  when AVERAGE needs to be calculated properly, column with unique values should be populated in visual - insure this.





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

Proud to be a Super User!






Mahesh0016
Super User
Super User

Hii @dpombal I hope this helps you!THANK YOU!!

version 2 with ALL also not working

DISTANCE TOTAL AVERAGE MD = CALCULATE(
     AVERAGE('TableGPS'[DISTANCE]),
    'TableGPS'[Type]="MD"&&
    'TableGPS'[DURATION]>=70,
   ALL('TableGPS'[DATEF],'TableGPS'[DRILL])

)

this was not the fail..thanks

@dpombal Please share your ENDOUTPUT in table and dataset.

I have uploaded sample PBIX file, thanks in advancehttps://1drv.ms/u/s!Am7buNMZi-gwg8hT4eo1bkHP975Egg?e=goyfU7 

some_bih
Super User
Super User

Hi @dpombal try ALLEXCEPT (TableGPS[DATEF], 'TableGPS'[DRILL])  and check you results. I hope this help





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

Proud to be a Super User!






Hi @dpombal  try your measure 

DISTANCE TOTAL AVERAGE MD v1 
= CALCULATE(
     AVERAGE(TableGPS[DISTANCE]),
    TableGPS[Type]="MD",
    TableGPS[DURATION]>=70
)




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

Proud to be a Super User!






This measure is not valid for my example. I need to removefilters from 2 columns DATE and DRILL, and your measure doesn't removes these filters.

Hi @dpombal for date 21.03.2023 there is not rows which are once from your filter argument of calculate:  

TableGPS[Type]="MD",
TableGPS'[DURATION]>=70,

 

Give as example which expected value you are looking for certain filters so we could try to create measure.





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

Proud to be a Super User!






No ALLEXCEPT does not work...in fact it makes opposite operation.

Why is failing ...REMOVEFILTERS...

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.