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

Win a FREE 3 Day Ticket to FabCon Vienna. Apply now

Reply
aroucadaniel
Frequent Visitor

Display weekly chart on a page filtered by a single day

Hello,

 

We have a report where the user selects a single day in the filter to view the charts.

 

However, in one of the charts, we want to show the evolution of a table column in the last 7 days.

 

Example:
If user filters by 10/20/2022, the line chart will display the days: (1) 10/20/2022, (2) 10/19/2022, (3) 10/18/2022, (4) 10/17/2022, (5) 10/16/2022, (6) 10/15/2022, (7) 10/14/2022.


Note: We cannot change the filter to relative date or interval, since the other graphs only show the values ​​of the single selected day.

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@aroucadaniel , if you select  1 day and want to display more than that on rows /axis the filter/slcier should be on an independent table

 

//Date1 is independent Date table, Date is joined with Table
new measure =
var _max = maxx(allselected(Date1),Date1[Date])
var _min = _max -7
return
calculate( sum(Table[Value]), filter('Date', 'Date'[Date] >=_min && 'Date'[Date] <=_max))

 

Need of an Independent Date Table:https://www.youtube.com/watch?v=44fGGmg9fHI

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

1 REPLY 1
amitchandak
Super User
Super User

@aroucadaniel , if you select  1 day and want to display more than that on rows /axis the filter/slcier should be on an independent table

 

//Date1 is independent Date table, Date is joined with Table
new measure =
var _max = maxx(allselected(Date1),Date1[Date])
var _min = _max -7
return
calculate( sum(Table[Value]), filter('Date', 'Date'[Date] >=_min && 'Date'[Date] <=_max))

 

Need of an Independent Date Table:https://www.youtube.com/watch?v=44fGGmg9fHI

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.