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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
4SSSWIM
Regular Visitor

Creating a toggle showing either last 3 days of data or all data

Hi,

I'm currently facing a challenge with visualizing data from a .csv file I import from blob storage. This file contains an Index and angle values derived from sensor readings, and it's updated once or twice a day, although there are occasions when several days pass without updates.

 

4SSSWIM_0-1715342172036.png

 

I aim to create a plot with a toggle feature that allows users to switch between viewing the last three days of data and the entire dataset. Specifically, I want the "All Data" option to display all data, while the "Last 3 Days of Data" option shows only the data from the last three available days, not just the past three calendar days.

4SSSWIM_1-1715342218468.png

 

I've experimented with the relative date filter, but it doesn't meet my needs because it filters the data based on the current date, counting backward three days, rather than focusing on the last three days when data was actually recorded.

Could you help me devise a solution that dynamically adjusts to show the last three days of recorded data, regardless of when those days occurred?

Sorry if this might be trivial, but I am pretty new to PowerBI.

Thanks!

1 ACCEPTED SOLUTION
miTutorials
Super User
Super User

The below tutorial should help solve your problem. You might have to make small changes to meet your requirements.

 

Create slicer with Custom Time Periods in PowerBI | Time Intelligence | MiTutorials (youtube.com)

View solution in original post

2 REPLIES 2
4SSSWIM
Regular Visitor

Thanks!

That worked great! Instead of TODAY() I used the MAX(Dim_Date[]) function for the "Last_10_days" VAR in the "Period_Selection" measure.

miTutorials
Super User
Super User

The below tutorial should help solve your problem. You might have to make small changes to meet your requirements.

 

Create slicer with Custom Time Periods in PowerBI | Time Intelligence | MiTutorials (youtube.com)

Helpful resources

Announcements
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!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

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