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
vinhnguyen_phan
Frequent Visitor

Different behaviour of date slicer in combination of REMOVEFILTERS

I observe a difference in the way the slicer work with date and time data in combination with using of REMOVEFILTERS in a measure. 

Below is an demonstration with financials sample data

I create a measure as below 

 

sum_sale_all_products = CALCULATE(SUM(financials[ Sales]), REMOVEFILTERS(financials[Product]))
 
The report is as below., The slicer on top set to Date field, use only Year and Month. The matrix below use Segment, Products and Date in rows

 

When the slicer is in vertical list or drop down mode, all the values of sum_sale_all_products are equal for each segment, which is as expected
 
 vinhnguyen_phan_0-1720666964520.png
When the slicer is in between/before/after mode, the values of _sum_sale_all_products are different, in the same segment, which is not expected
 
vinhnguyen_phan_1-1720667322618.png

It seem that in between mode, for each product, only the time range in which the sale data of that product exist is selectec. The measure is then calculated with that time range for all products. Because some products does not have sale data in some particular month, the sale of other products in the other month is not counted into the measure.

 

Is this a bug or I mis-understood something? Thank you

 
 
2 ACCEPTED SOLUTIONS
Samarth_18
Community Champion
Community Champion

Hi @vinhnguyen_phan 

 

What I feel the difference in results between the "Vertical List/Drop-down" and "Between/Before/After" modes arises from how Power BI interprets and applies the slicer selections: 

  • Vertical List or Drop-down Mode: In this mode, the slicer generally applies a single selection for each filter context (e.g., a specific year and month). This means the filter context for the measure sum_sale_all_products remains consistent across all segments and products.
  • Between/Before/After Mode: In these modes, Power BI attempts to dynamically filter data based on the time range selected. This can lead to different filter contexts being applied to different segments and products based on the availability of data within the selected time range.

Best Regards,
Samarth

If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
Connect on Linkedin

View solution in original post

@Samarth_18 most probably your are right. By changing my model to like this and set the Slicer to Date[Date], the report work as expected.

vinhnguyen_phan_0-1720781148429.png

 

View solution in original post

4 REPLIES 4
Samarth_18
Community Champion
Community Champion

Hi @vinhnguyen_phan 

 

What I feel the difference in results between the "Vertical List/Drop-down" and "Between/Before/After" modes arises from how Power BI interprets and applies the slicer selections: 

  • Vertical List or Drop-down Mode: In this mode, the slicer generally applies a single selection for each filter context (e.g., a specific year and month). This means the filter context for the measure sum_sale_all_products remains consistent across all segments and products.
  • Between/Before/After Mode: In these modes, Power BI attempts to dynamically filter data based on the time range selected. This can lead to different filter contexts being applied to different segments and products based on the availability of data within the selected time range.

Best Regards,
Samarth

If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
Connect on Linkedin

@Samarth_18 most probably your are right. By changing my model to like this and set the Slicer to Date[Date], the report work as expected.

vinhnguyen_phan_0-1720781148429.png

 

vinhnguyen_phan
Frequent Visitor

My model only has one table. Here I modified your pbix file a bit to reproduce the phenomenon

- Remove the dropdown slicer

- Change the timeline slicer to the Date field of the Financials table

- Add Category column

- Change Table to Matrix.

- Add Category into Matrix row on top of Product

vinhnguyen_phan_0-1720758403857.png

 

 

vinhnguyen_phan_2-1720757155218.png

vinhnguyen_phan_1-1720758427995.png

I cannot upload the pbix file to this forum

lbendlin
Super User
Super User

Cannot reproduce.  How does your data model look like?

 

 

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.