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

See when key Fabric features will launch and what’s already live, all in one place and always up to date. Explore the new Fabric roadmap

Reply
farhanaizzatie
New Member

Date range filter use only in calculation but not table visual

hi everyone, I have one problems where I have a date range filter in my report using transaction date in Db. this filter is not impacting the table visual as in I edit interaction and select None for table visual. I only want to use this date filter in my leave calculation (example for transaction type = carryover, entitlement, expiry, etc).

 

however, I cant get the calculation to honour the selected date range. says I want to calculate the expiry leave between Jan 1, 2025 - Jan 31, 2025.. it will sum up all expiry transaction type records in the table. how do I fix this or anyone has any idea how to make it work? 

I've tried with calculated column and measure but both doesnt seems to work

 

4 REPLIES 4
v-mdharahman
Community Support
Community Support

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.

Deku
Community Champion
Community Champion

Ok, from my understanding

  • you have a slicer and table visual
  • The slicer has dates
  • You have set the slicer to not interact with the table visual
  • You want to have a leave measure in the table, that respects the date slicer

The problem is because the interation is set to None, there is no date filter context on the table for the leave measure to pick up.

Since you are creating a leave calculation, you should be turn the interation back on. You can get the filtered rows to reappear with the measure. in the measure you can use CALCULATE( , REMOVEFILTER( Date ) ) to remove the effect of the date slicer. With VALUES( date[date] ) you can grab all the dates from the slicer for use in your calculation 


Did I answer your question?
Please help by clicking the thumbs up button and mark my post as a solution!
Deku
Community Champion
Community Champion

Cant comment without having a understanding of your semantic models structure


Did I answer your question?
Please help by clicking the thumbs up button and mark my post as a solution!

hi @Deku , let me share my report structure.

 

I have one table with leave transaction details and a custom table where I create the calendar table 

MonthYearTable =
ADDCOLUMNS (
    CALENDAR(DATE(2025, 1, 1), DATE(2030, 12, 31)),  -- Define your date range
    "MonthYear", FORMAT([Date], "YYYYMM"),          -- Format as "Month Year"
    "SortOrder", YEAR([Date]) * 100 + MONTH([Date])   -- Create a sortable value (e.g., 202101 for Jan 2021)
)
 
this 2 table is linked via leavetable.transactiondate = monthyeartable.date
 
then i used the monthyear column in a slicer. from there I would like to get the date range and use it in my calculation. hope you get what im trying to do 

Helpful resources

Announcements
May PBI 25 Carousel

Power BI Monthly Update - May 2025

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

May 2025 Monthly Update

Fabric Community Update - May 2025

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