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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
RexaZii93
Helper I
Helper I

Easy Question, I want to remove ALL from this command

 

 

I have this command:

 

CALCULATE (
Count ( 'AMS Flights Data'[Arr/ Dep]),
FILTER (
ALL ( 'AMS Flights Data' ),
COUNTROWS (
FILTER (
'AMS Flights Data',
EARLIER ( 'AMS Flights Data'[Actual Date] ) = DATEADD ( 'AMS Flights Data'[Actual Date], -7, Day)
)
)
)
)
 
Its working fine, but I can't apply any filtering to it, I need to keep the command but remove this part:
FILTER (
ALL ( 'AMS Flights Data' ),
 
I tried multiple ways but didn't work
 
Please help
 
1 ACCEPTED SOLUTION

@RexaZii93 

Please try

Measure1 =
CALCULATE (
COUNT ( 'AMS Flights Data'[Arr/ Dep] ),
DATEADD ( 'Date'[Date], -7, DAY )
)

View solution in original post

11 REPLIES 11
tamerj1
Super User
Super User

Hi @RexaZii93 

Use ALLSELECTED 

 

I tried Allselected but no data is showing in my chart:

 

Screenshot (57).png

@RexaZii93 

You have to use a date table

I have a date table though the formula works fine with out filtering it shows the last 7 days according to the date I use, but when I apply a filter on the chart itself it does not change.

@RexaZii93 

Would you please again the frmula you are currently using?

 
This one:
 
Count ( 'AMS Flights Data'[Arr/ Dep]),
FILTER (
ALL ( 'AMS Flights Data' ),
COUNTROWS (
FILTER (
'AMS Flights Data',
EARLIER ( 'AMS Flights Data'[Actual Date] ) = DATEADD ( 'AMS Flights Data'[Actual Date], -7, Day)
)
)
)
)
 
My formula does filter date fine so if I chose any date it would substract 7 days automatically, but when I apply another filter on visual it doesn't effect it I believe the issue is with this part which am unable to remove:
FILTER (
ALL ( 'AMS Flights Data' ),
 

@RexaZii93 

Please try

Measure1 =
CALCULATE (
COUNT ( 'AMS Flights Data'[Arr/ Dep] ),
DATEADD ( 'Date'[Date], -7, DAY )
)

I tried but it shows no value and its weird, even without filter this formula shows Blank.

@RexaZii93 

Please make sure you're using only the date column from the date table in your visual and slicers. 

Thanks it worked when I used callendar date

I tried but it shows no value and its weird, even without filter this formula shows Blank.

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

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