Forum Discussion
Dynamic line chart axis based on the date selection
- 4 years ago
Hi baijumohan1990 ,
According to your description, you want to create a dynamic DateLw table changed by the Date slicer, but a calculated table/column can't affected by slicers, it's by design. You can go to the Data view of the DateLw table to see, it always stays the same no matter how the slicer changes.
Here's my solution.
1. Modify the DateLw table like below. Don't make relationship between DateLw table and other tables.
DateLw = CALENDARAUTO()2. Modify the LastWkSales measure:
LastWkSales = IF ( MAX ( 'DateLw'[Date] ) >= [LastWkStart] && MAX ( 'DateLw'[Date] ) <= [LastWkEnd], CALCULATE ( SUM ( 'Table'[Sales] ), FILTER ( ALL ( 'Table' ), 'Table'[Date] = MAX ( 'DateLw'[Date] ) ) ), BLANK () )Get the correct result.
I attach my sample below for reference.
Best Regards,
Community Support Team _ kalyjIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi baijumohan1990 ,
According to your description, you want to create a dynamic DateLw table changed by the Date slicer, but a calculated table/column can't affected by slicers, it's by design. You can go to the Data view of the DateLw table to see, it always stays the same no matter how the slicer changes.
Here's my solution.
1. Modify the DateLw table like below. Don't make relationship between DateLw table and other tables.
DateLw = CALENDARAUTO()
2. Modify the LastWkSales measure:
LastWkSales =
IF (
MAX ( 'DateLw'[Date] ) >= [LastWkStart]
&& MAX ( 'DateLw'[Date] ) <= [LastWkEnd],
CALCULATE (
SUM ( 'Table'[Sales] ),
FILTER ( ALL ( 'Table' ), 'Table'[Date] = MAX ( 'DateLw'[Date] ) )
),
BLANK ()
)
Get the correct result.
I attach my sample below for reference.
Best Regards,
Community Support Team _ kalyj
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Thank you. that's works like a charm 🙂