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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

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
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

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