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