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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
fsim
Responsive Resident
Responsive Resident

yet another allexcept question

hi !

I  wanted to get the first TimeSheet date encoded by every employee.

mindate = CALCULATE(MIN((TS[msdyn_date])), ALLEXCEPT(TS,TS[msdyn_bookableresource]))
this work perfectly.
then I also wanted to keep a calendar filter.  So I added TS[msdyn_date] to the ALLEXCEPT -->
mindate = CALCULATE(MIN((TS[msdyn_date])), ALLEXCEPT(TS,TS[msdyn_bookableresource],TS[msdyn_date]))
I expected that any filter applied to the Date table would affect my mindate. It doesn't. 
The Calendar table is linked to the msdyn_date and I put a slicer on it.
Screenshot 2021-05-19 113345.png
 
deit: I tried something else : 
mindate = CALCULATE(MIN((TS[msdyn_date])), ALLEXCEPT(TS,TS[msdyn_bookableresource], 'Date'[YearMonthShort]))
this worked, but I cannot accept that solution because the slicer will not be the only way to filter dates 😕
 
1 ACCEPTED SOLUTION
OwenAuger
Super User
Super User

Hi @fsim 

ALLEXCEPT can take a mixture of column & table references for arguments 2+.

So you could write this to ensure any filters from the 'Date' table are retained:

 

mindate =
CALCULATE (
    MIN ( TS[msdyn_date] ),
    ALLEXCEPT ( TS, TS[msdyn_bookableresource], 'Date' )
)

 

 Does this achieve the result you are wanting?

 

Regards,

Owen


Owen Auger
Did I answer your question? Mark my post as a solution!
Blog
LinkedIn

View solution in original post

2 REPLIES 2
OwenAuger
Super User
Super User

Hi @fsim 

ALLEXCEPT can take a mixture of column & table references for arguments 2+.

So you could write this to ensure any filters from the 'Date' table are retained:

 

mindate =
CALCULATE (
    MIN ( TS[msdyn_date] ),
    ALLEXCEPT ( TS, TS[msdyn_bookableresource], 'Date' )
)

 

 Does this achieve the result you are wanting?

 

Regards,

Owen


Owen Auger
Did I answer your question? Mark my post as a solution!
Blog
LinkedIn
fsim
Responsive Resident
Responsive Resident

@OwenAuger , 

it worked.
I don't know why I wanted to add a column instead of a full table. Thank you !

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

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