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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

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
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.