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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. 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
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! Prices go up Feb. 11th.

Feb2025 Sticker Challenge

Join our Community Sticker Challenge 2025

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

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