Supplies are limited. Contact info@espc.tech right away to save your spot before the conference sells out.
Get your discountScore big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount
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! |
|