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

View all the Fabric Data Days sessions on demand. View schedule

Reply
Victormar
Helper V
Helper V

Personalized date filter

Hello community,

 

I have a report where I have visualizations based on the sending date for the data. This data belongs to vehicles, and they also have a contract start date, and a latest sending data date, if that makes sense.

 

Until now I was using a date column coming from a date table, based on the minimum sending date, but I would like to create a new personalized measure for the date, that would take the contract start date as the starting date, even if there was data sent before (that could happen) and the latest date where the vehicle sent data, and that would be applied to a date filter that I have for the visualizations.

 

Is that possible?

 

Cheers 😄

4 REPLIES 4
Victormar
Helper V
Helper V

VehicleContract Start Date
A2022-10-22
B2021-05-04
C2021-09-06
D2021-08-03

 

VehicleDateValue
A2023-10-191000
A2023-10-182000
A2023-10-173000
B2023-10-182500

 

The I have a calendar table created dinamically basec on min(readings[date]), like:

 

DIM_Calendar =
VAR StartDate = MIN(Readings([contract_start_date]) ---> Columna a cambiar
VAR YearStartDate = YEAR(StartDate)
VAR Dates =
FILTER(
CALENDARAUTO(),
YEAR( [Date]) >= YearStartDate && YEAR([Date])<= YEAR(TODAY())
)
RETURN

ADDCOLUMNS(
Dates,
"Year", YEAR([Date]),
"Year Month", YEAR([Date]) & "-" & FORMAT([Date], "mm"),
"Quarter", FORMAT([Date], "\QQ"),
"Month Num", MONTH([Date]),
"Month Name", FORMAT([Date], "mmm"),
"Month", FORMAT([Date], "mm"),
"Month of Year", FORMAT([Date], "mmm") & "-" & YEAR([Date]),
"Week",WEEKNUM([Date]),
"Week Day Num", WEEKDAY([Date],2),
"Week Day", FORMAT([Date], "ddd"),
"Day", DAY([Date])
)

 

Once I have created this table, I use the date to add it to the displayed filter, and then I create a line chart where I have date in the x axis and the readings in the y axis. Also I have a filter to select which vehicle/fleet/customer I want, and my desire would be that the date filter would show the contract_start_date as the initial value, and the max reading date as the max value, according to my selection:

Victormar_0-1697709740381.png

Thanks again 🙂

 

isjoycewang
Solution Supplier
Solution Supplier

Hi @Victormar,

 

Please consider below measure and add it into the visual level filter. Thanks.

Start from Contract Start Date = 
IF( CALCULATE(MIN('Table'[Contract Start Date])) < SELECTEDVALUE('Table'[Sent Date]),1,0)

isjoycewang_0-1697706497005.png

 

Best Regards,

Joyce 

 

Thanks for your help. I tried it but the visual doesn't change, it's always the same. Could it be that the filters are not made to dynamically change?

It should be able to change. Please share some dummy data and your chart so we could have more information, thanks!

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.

Top Solution Authors
Top Kudoed Authors