Forum Discussion
Date range filter use only in calculation but not table visual
Hi farhanaizzatie,
Thanks for reaching out to the Microsoft fabric community forum.
It looks like you want a date range slicer based on "Transaction Date" to only impact your leave calculation (like for Transaction Type = "expiry") and not affect the table visual. You did the right thing by using Edit Interactions -> None on the table visual, so the slicer doesn’t filter it directly. That part’s perfect. However, for your measure to actually respond to the date range, your DAX needs to explicitly reference the slicer context, because disabling visual interaction doesn’t stop the slicer from affecting the model, it just stops it from filtering that visual.
You can try this DAX measure:
ExpiryLeaveInDateRange :=
CALCULATE (
SUM ( Transactions[LeaveAmount] ), -- Or whatever column you’re summing
Transactions[TransactionType] = "expiry",
FILTER (
ALL ( Transactions[TransactionDate] ),
Transactions[TransactionDate] >= MIN ( Transactions[TransactionDate] )
&& Transactions[TransactionDate] <= MAX ( Transactions[TransactionDate] )
)
)
Here "ALL ( Transactions[TransactionDate] )" removes any existing date filters (important if you later want full control) while MIN and MAX re-apply the slicer’s selected date range dynamically. This lets your measure honor the slicer even if the slicer doesn’t visually filter the table.
I would also take a moment to thank Deku, for actively participating in the community forum and for the solutions you’ve been sharing in the community forum. Your contributions make a real difference.
If I misunderstand your needs or you still have problems on it, please feel free to let us know.
Best Regards,
Hammad.
Community Support Team
If this post helps then please mark it as a solution, so that other members find it more quickly.
Thank you.
- Anonymous1 year agoNot applicable
Hi farhanaizzatie,
As we haven’t heard back from you, so just following up to our previous message. I'd like to confirm if you've successfully resolved this issue or if you need further help.
If yes, you are welcome to share your workaround and mark it as a solution so that other users can benefit as well. If you find a reply particularly helpful to you, you can also mark it as a solution.
If you still have any questions or need more support, please feel free to let us know. We are more than happy to continue to help you.
Thank you for your patience and look forward to hearing from you.- Anonymous1 year agoNot applicable
Hi farhanaizzatie,
I wanted to check if you had the opportunity to review the information provided. Please feel free to contact us if you have any further questions. If my response has addressed your query, please accept it as a solution so that other community members can find it easily.
Thank you.- Anonymous1 year agoNot applicable
Hi farhanaizzatie,
May I ask if you have resolved this issue? If so, please mark the helpful reply and accept it as the solution. This will be helpful for other community members who have similar problems to solve it faster.
Thank you.