Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Hello,
i have data with a range of over the last 2 years up to today.
I have a page with a clustered column chart and a slicer for date column.
I want the chart to display the last 30 days when no date is selected in date slicer, but when a date is selected it should show the data in the chart.
I tried relative filter showing the last 30 days which is working. But i want to achive that data also is displayed when i select a date from slicer past those 30 days.
I understand that with the relative date filter, no data is displayed if I select a date that is before the 30 days.
But Is there a way to change this behavior?
Solved! Go to Solution.
@LuITS , Create a Disconnected Date Table:
DateTable = CALENDAR(MIN('YourData'[Date]), MAX('YourData'[Date]))
Create a Measure for Last 30 Days:
DAX
Last30DaysData =
CALCULATE(
SUM('YourData'[Value]),
FILTER(
'YourData',
'YourData'[Date] >= TODAY() - 30 && 'YourData'[Date] <= TODAY()
)
)
Create a Measure for Selected Date Range:
DAX
SelectedDateRangeData =
CALCULATE(
SUM('YourData'[Value]),
FILTER(
'YourData',
'YourData'[Date] IN VALUES('DateTable'[Date])
)
)
Combine the Measures:
DAX
FinalData =
IF(
ISFILTERED('DateTable'[Date]),
[SelectedDateRangeData],
[Last30DaysData]
)
Use the FinalData measure in your clustered column chart.
Proud to be a Super User! |
|
@LuITS , Create a Disconnected Date Table:
DateTable = CALENDAR(MIN('YourData'[Date]), MAX('YourData'[Date]))
Create a Measure for Last 30 Days:
DAX
Last30DaysData =
CALCULATE(
SUM('YourData'[Value]),
FILTER(
'YourData',
'YourData'[Date] >= TODAY() - 30 && 'YourData'[Date] <= TODAY()
)
)
Create a Measure for Selected Date Range:
DAX
SelectedDateRangeData =
CALCULATE(
SUM('YourData'[Value]),
FILTER(
'YourData',
'YourData'[Date] IN VALUES('DateTable'[Date])
)
)
Combine the Measures:
DAX
FinalData =
IF(
ISFILTERED('DateTable'[Date]),
[SelectedDateRangeData],
[Last30DaysData]
)
Use the FinalData measure in your clustered column chart.
Proud to be a Super User! |
|
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!