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
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
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.

Top Solution Authors