Forum Discussion
Dynamic Slicers with 2 dates
- 2 years ago
Hi, johnbasha33
You need to drop one of the columns of end date or start date and store it in a table of calculations and put it into the slicer as shown in the following figure:
End day table = SUMMARIZE('Table','Table'[End Date])I created the following two metrics:
share price of end date = VAR _end_day = SELECTEDVALUE('End day table'[End Date]) RETURN CALCULATE(SUM('Table'[Share Price]),FILTER(ALL('Table'),'Table'[End Date]=_end_day))share price of start date = VAR _start_day = SELECTEDVALUE('Table'[Start Date]) RETURN CALCULATE(SUM('Table'[Share Price]),FILTER( ALL('Table'), 'Table'[Start Date]=_start_day ) )I use both metrics in the table visual:
The results are as follows:
Best Regards,
hackcrr
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- 2 years ago
Hi,
You can unpivot Start date and end date columns, so you will get values column in which all dates will be stored ,
now you can use values column in between slicer and get share price from date range
Hi,
You can unpivot Start date and end date columns, so you will get values column in which all dates will be stored ,
now you can use values column in between slicer and get share price from date range
- johnbasha332 years ago
Super User
Hi GauravAher73 this seems to be a working solution, i am surprised it is that simple. would you please share me the pbix for the same? i will review it and will mark it as solution.