This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. We're covering it all. You won't want to miss it.
Learn moreLevel up your Power BI skills this month - build one visual each week and tell better stories with data! Get started
I have a hourly price data, below is a sample:
Eventdatetime Price
7/1/2019 0:00 22
7/1/2019 1:00 24
7/1/2019 2:00 24
7/1/2019 3:00 23
7/1/2019 4:00 23
7/1/2019 5:00 25
7/1/2019 6:00 28
I created a simple line plot of price time series and I have a slicer (between dates) to control the number of days to be viewed.
Is it possible to plot, two days ( 48 hours) at a time ? Yes, I can use the slicer for this but the goal is to allow the user to select a day ( using a slicer with list of all dates) and the plot should show hourly prices for selected day and the next day.
Thanks!
Solved! Go to Solution.
Hi @anandgovindaraj ,
You need to do the following steps:
Price over 2 days =
VAR SelectedDate =
MAX ( DimDate[Date] )
VAR Number_of_days = 1 //Used to create number of days to show in chart if want to show 3 days number should be 2
RETURN
CALCULATE (
SUM ( EventDate[Price] );
FILTER (
ALL ( EventDate[Eventdatetime].[Date] );
EventDate[Eventdatetime].[Date] >= SelectedDate
&& EventDate[Eventdatetime].[Date] <= SelectedDate + Number_of_days
)
)
Final result below:
See attach PBIX file.
Regards,
MFelix
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em Português@anandgovindaraj solution attached, just add a simple measure as below, and create a date table for slicer.
Total Price = CALCULATE( SUM( Table1[ Price] ), DATESBETWEEN( Table1[Eventdatetime ].[Date], MIN( 'Calendar'[Date] ), NEXTDAY( 'Calendar'[Date] ) ))
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.
Thanks!
Hi @anandgovindaraj ,
You need to do the following steps:
Price over 2 days =
VAR SelectedDate =
MAX ( DimDate[Date] )
VAR Number_of_days = 1 //Used to create number of days to show in chart if want to show 3 days number should be 2
RETURN
CALCULATE (
SUM ( EventDate[Price] );
FILTER (
ALL ( EventDate[Eventdatetime].[Date] );
EventDate[Eventdatetime].[Date] >= SelectedDate
&& EventDate[Eventdatetime].[Date] <= SelectedDate + Number_of_days
)
)
Final result below:
See attach PBIX file.
Regards,
MFelix
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em Português@anandgovindaraj solution attached, just add a simple measure as below, and create a date table for slicer.
Total Price = CALCULATE( SUM( Table1[ Price] ), DATESBETWEEN( Table1[Eventdatetime ].[Date], MIN( 'Calendar'[Date] ), NEXTDAY( 'Calendar'[Date] ) ))
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.
Check out the April 2026 Power BI update to learn about new features.
Sign up to receive a private message when registration opens and key events begin.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
| User | Count |
|---|---|
| 36 | |
| 28 | |
| 28 | |
| 20 | |
| 18 |
| User | Count |
|---|---|
| 65 | |
| 35 | |
| 33 | |
| 25 | |
| 24 |